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

Home » Public Forums » archive » Re: PLOT and colors
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: PLOT and colors [message #51468] Fri, 24 November 2006 10:18
David Fanning is currently offline  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 Go to previous message
Jean H. is currently offline  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 Go to previous message
Paolo Grigis is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: getting an IDLgrPlot drawn
Next Topic: IDL 6.3 Installation error code 1633

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

Current Time: Wed Oct 08 19:51:15 PDT 2025

Total time taken to generate the page: 0.00351 seconds