Re: Color problem. [message #80099] |
Fri, 04 May 2012 14:09 |
Mark Piper
Messages: 198 Registered: December 2009
|
Senior Member |
|
|
>> If you look in the online help, under "Plot", then under the "Color" property, there is a link to "string or RGB vector". That page contains a list of the shorthand color names like "r","b","g" and it also contains a table of all of the colors.
Also note (thanks, Katie!) that this table gives the index for a color along with its name; e.g., 'hot pink' (in the upper right corner) is index 58:
IDL> print, !color.hot_pink
255 105 180
IDL> print, !color.(58)
255 105 180
This could be handy for indexing colors in a series of plots.
mp
|
|
|
Re: Color problem. [message #80100 is a reply to message #80099] |
Fri, 04 May 2012 10:15  |
d.poreh
Messages: 406 Registered: October 2007
|
Senior Member |
|
|
On Friday, May 4, 2012 8:59:19 AM UTC-7, Chris Torrence wrote:
> On Friday, May 4, 2012 7:48:48 AM UTC-6, dave poreh wrote:
>> Folk
>> hi,
>> I need to plot some point with different color like this:
>>
>> IDL> p = plot(vert[0,*],vert[1,*], 'or', /SYM_FILLED, SYM_SIZE=0.5, NAME='Red data')
>> IDL> p1 = plot(vert[0,*],vert[4,*], 'ob', /SYM_FILLED, /OVERPLOT,SYM_SIZE=0.5, NAME='Smoothed',/undoc)
>> IDL> p1 = plot(vert[0,*],vert[2,*], 'og', /SYM_FILLED, /OVERPLOT,SYM_SIZE=0.5, NAME='Smoothed',/undoc)
>> IDL> p1 = plot(vert[0,*],vert[3,*], 'oo', /SYM_FILLED, /OVERPLOT,SYM_SIZE=0.5, NAME='Smoothed',/undoc)
>>
>> how many color we have like this: 'or', 'ob', 'og' ..... i need some more color and i do not know the abbreviation for them!
>> any help would be appreciated,
>> Cheers,
>> Dave
>
> Actually, if you want a lot of colors, you should probably use the COLOR property instead...
> p = PLOT(x,y,'o',COLOR='Burlywood')
> You can get the list of colors by doing:
> print, tag_names(!color)
> If you look in the online help, under "Plot", then under the "Color" property, there is a link to "string or RGB vector". That page contains a list of the shorthand color names like "r","b","g" and it also contains a table of all of the colors.
> -Chris
Thanks Chris. it is really perfect.
Cheers,
Dave
|
|
|
Re: Color problem. [message #80102 is a reply to message #80100] |
Fri, 04 May 2012 08:59  |
chris_torrence@NOSPAM
Messages: 528 Registered: March 2007
|
Senior Member |
|
|
On Friday, May 4, 2012 7:48:48 AM UTC-6, dave poreh wrote:
> Folk
> hi,
> I need to plot some point with different color like this:
>
> IDL> p = plot(vert[0,*],vert[1,*], 'or', /SYM_FILLED, SYM_SIZE=0.5, NAME='Red data')
> IDL> p1 = plot(vert[0,*],vert[4,*], 'ob', /SYM_FILLED, /OVERPLOT,SYM_SIZE=0.5, NAME='Smoothed',/undoc)
> IDL> p1 = plot(vert[0,*],vert[2,*], 'og', /SYM_FILLED, /OVERPLOT,SYM_SIZE=0.5, NAME='Smoothed',/undoc)
> IDL> p1 = plot(vert[0,*],vert[3,*], 'oo', /SYM_FILLED, /OVERPLOT,SYM_SIZE=0.5, NAME='Smoothed',/undoc)
>
> how many color we have like this: 'or', 'ob', 'og' ..... i need some more color and i do not know the abbreviation for them!
> any help would be appreciated,
> Cheers,
> Dave
Actually, if you want a lot of colors, you should probably use the COLOR property instead...
p = PLOT(x,y,'o',COLOR='Burlywood')
You can get the list of colors by doing:
print, tag_names(!color)
If you look in the online help, under "Plot", then under the "Color" property, there is a link to "string or RGB vector". That page contains a list of the shorthand color names like "r","b","g" and it also contains a table of all of the colors.
-Chris
|
|
|