Re: PLOT and colors [message #51468] |
Fri, 24 November 2006 10:18 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Jean H. writes:
> you can also use a function from RSI's tutorial:
> function rgb2idx, rgb
> return, rgb[0]+(rgb[1]*2L^8)+(rgb[2]*2L^16)
> end
>
> plot, [...], color = rgb2idx[0,0,255] for a nice blue..
Or, whatever color happens to be loaded in color index
255 if you happen to have DEVICE, DECOMPOSED=0 set at
the moment. :-)
If you want a nice blue, you are MUCH better off trying
something like this:
plot, findgen(11), color=fsc_color('sky blue')
Now THAT should give you a nice blue! :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: PLOT and colors [message #51469 is a reply to message #51468] |
Fri, 24 November 2006 10:00  |
Jean H.
Messages: 472 Registered: July 2006
|
Senior Member |
|
|
Ingo von Borstel wrote:
> Hello there,
>
> when using the PLOT command, it comes with a COLOR=xyz keyword. That
> works nicely in the way that I can specify in my case the shade of red
> that is plotted (xyz = 0...255), but I cannot make it plot in another
> color, e.g. yellow, blue or so. Is there a way to produce a color plot
> with IDL that allows me to plot using all colors available to my display
> and/or printer?
>
> Best regards,
> Ingo
you can also use a function from RSI's tutorial:
function rgb2idx, rgb
return, rgb[0]+(rgb[1]*2L^8)+(rgb[2]*2L^16)
end
plot, [...], color = rgb2idx[0,0,255] for a nice blue..
Jean
|
|
|
Re: PLOT and colors [message #51497 is a reply to message #51469] |
Fri, 24 November 2006 00:37  |
Paolo Grigis
Messages: 171 Registered: December 2003
|
Senior Member |
|
|
short answer:
device,decomposed=0
long answer:
http://www.dfanning.com/color_tips/colorchp3.html
useful command:
help,/device
Ciao,
Paolo
Ingo von Borstel wrote:
> Hello there,
>
> when using the PLOT command, it comes with a COLOR=xyz keyword. That
> works nicely in the way that I can specify in my case the shade of red
> that is plotted (xyz = 0...255), but I cannot make it plot in another
> color, e.g. yellow, blue or so. Is there a way to produce a color plot
> with IDL that allows me to plot using all colors available to my display
> and/or printer?
>
> Best regards,
> Ingo
|
|
|