comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Plot colors
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Plot colors [message #84985 is a reply to message #84984] Thu, 20 June 2013 11:25 Go to previous messageGo to previous message
Mats Löfdahl is currently offline  Mats Löfdahl
Messages: 263
Registered: January 2012
Senior Member
On 2013-06-20 19:24, Michael Galloy wrote:
> On 6/20/13 12:59 AM, Mats Löfdahl wrote:
>> What are your favorite colors for overplotting several data sets in the
>> same diagram? (I'm assuming Coyote graphics here.) You'd want them to be
>> easy to tell apart and to have a good and similar contrast against the
>> (white) background.
>>
>> For two colors it's easy: red and blue.
>>
>> But already for three colors, if you add green you get something with
>> less contrasty. And for more colors, if you add the complement colors
>> cyan, magenta, and yellow, both yellow and cyan have the same problem.
>> So then I usually inspect the color names in cgcolor and pick darker
>> versions of the too light colors and some redder version of yellow. And
>> if I need more than six I don't really know what to do...
>>
>> So, what is a good strategy? Do you have a good list that you always
>> use, and truncate it to the needed length? Or do you start the list
>> differently depending on how long it has to be? Has anybody written a
>> function for this? Something like
>>
>> function plotcolors, index, Ncolors
>>
>>
>> /Mats
>
> This is what the qualitative color tables in the Brewer color tables are
> for.
>
> Checkout color tables 27-34 in the Brewer color tables (the second set
> of color tables) on:
>
> http://docs.idldev.com/mglib/vis/color/mg_loadct.html
>
> To use one of these, say 27, just do:
>
> mg_loadct, /brewer, 27
>
> and then just use COLOR=0, COLOR=1, ... COLOR=11 (color table 27 has 12
> values).
>
> The Brewer color tables are included in IDL now, but they interpolated
> intermediate values for the qualitative color tables, so you have to use
> something like the following to get the 5th of the 12 values in a color
> table:
>
> COLOR=5 * 256 / 12

Brewer table 32 (Dark2) might be useful. Maybe 29 (Set1) as well. The
rest of them look like they include colors that are too bright for lines
on a white background.

The Dark2 colors look similar to the colors David suggested. Are they
the same? Or how would I refer to them in the cgcolor naming scheme? How
about the Set1 colors?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL beginner-MPFIT questions
Next Topic: Speeding up data crunching using IDL_IDLBridge with asychronous execution

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:36:19 PDT 2025

Total time taken to generate the page: 0.00419 seconds