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.")
|