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

Home » Public Forums » archive » Re: problem with color graph with idl 5.0 Win95 version
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: problem with color graph with idl 5.0 Win95 version [message #14200 is a reply to message #14189] Tue, 02 February 1999 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Vincent (corona@ba.infn.it) writes:

> hi ;) i'm a newbie of this very interesting language.
> I use the 5.0 version of IDL for Windows95, and i have this problem.
>
> I need to make a graph which contains more different plots inside. I
> have used the commands plot and oplot with the keywords Color but i have
> no what i want. The result is indeed the graph i need but every line is
> showed in a grey level rather then in a color way.
> Here is a little prg i have written for testing the graphic capabilities
> of IDL.
>
> Could someone help and show me where i make mistakes ?

You need to create some colors to draw with and then
load them. If you don't, IDL's default color table is
always grayscale. Something along these lines:

; Load red, green, and yellow colors starting at index 200.
; Read the color triples vertically.

r = [255, 0, 255]
g = [ 0, 255, 255]
b = [ 0, 0, 0]
TVLCT, r, g, b, 200

; Draw plots in colors.

Plot, data, Color=200
Oplot, moredata, Color=201
Oplot, stillmoredata, Color=202

There are quite a few articles about using color in IDL on
my web page in the Programming Tips section:

http://www.dfanning.com/documents/tips.html

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Map spanning Dateline?
Next Topic: !P.MULTI + POSITION keyword problem

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

Current Time: Fri Oct 10 22:32:42 PDT 2025

Total time taken to generate the page: 0.39965 seconds