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

Home » Public Forums » archive » Re: oplot with colours
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: oplot with colours [message #67478 is a reply to message #67477] Thu, 30 July 2009 21:07 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
b.a writes:

> 1) In my program, I need to plot several data on the same draw window.
> I know that oplot does this but even for the first curve, I don't want
> to use plot. Is there anyway that I ignore having plot for the first
> one and then using oplot?

You don't have to draw a plot. But you do have to have some
way of setting up the data coordinate system, so you have
something to overplot *on*. Do you have an alternative
method?

You can, of course, draw a plot in which nothing appears.
This, basically, just sets up the data coordinate system
for you:

Plot, [0,1], /NoData, YSTYLE=4, XSTYLE=4, XRANGE=[0,10], YRANGE=[0,1]


> 2) For each curve, I want to have different colour and on the draw
> window, I need to show that each colour represents which curve.

Well, you need a legend. You can probably find one ready-
built in the IDL software libraries that can be found on the
Internet, or you can just build your own legend with a combination
of PLOTS and XYOUTS commands.

Plots, [0.1, 0.2], [0.85, 0.85], /Normal, Color=FSC_Color('red')
XYOUTS, 0.21, 0.84, /Normal, 'Red indicates danger'
Plots, [0.1, 0.2], [0.80, 0.80], /Normal, Color=FSC_Color('blue')
XYOUTS, 0.21, 0.79, /Normal, 'Blue indicates safety'

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.")
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Noerase on Shade_Surf
Next Topic: Re: pixel value to x and y position

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

Current Time: Fri Oct 10 10:03:19 PDT 2025

Total time taken to generate the page: 1.75917 seconds