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 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: oplot with colours [message #67477] Thu, 30 July 2009 21:08 Go to next message
b.a is currently offline  b.a
Messages: 26
Registered: July 2009
Junior Member
On Jul 31, 1:29 pm, "b.a" <u4565...@anu.edu.au> wrote:
> Hi,
>
> I am writing a program (using IDL workbench) and I have two questions
> about plotting data. I appreciate if anyone can help.
>
> 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?
>
> 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.
>
> Thank you
> Afra

I also want to remove the plot by licking on a button. do we have
anything like "diplot" to remove the selected curve?
Re: oplot with colours [message #67478 is a reply to message #67477] Thu, 30 July 2009 21:07 Go to previous messageGo to next 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.")
Re: oplot with colours [message #67570 is a reply to message #67478] Thu, 30 July 2009 23:22 Go to previous message
b.a is currently offline  b.a
Messages: 26
Registered: July 2009
Junior Member
Thanks David, I used
Plot, [0,1], /NoData, YSTYLE=4, XSTYLE=4, XRANGE=[0,10], YRANGE=[0,1]
and it fixed the first problem. But is there any way that I can
selectively remove the plotted curves? for example, by clicking the
button relevant to each curve, I want it to be off the draw window.

Cheers
Afra
  Switch to threaded view of this topic Create a new topic Submit Reply
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: Wed Oct 08 19:32:04 PDT 2025

Total time taken to generate the page: 0.00601 seconds