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

Home » Public Forums » archive » oplot
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 [message #69520 is a reply to message #17728] Mon, 25 January 2010 09:24 Go to previous messageGo to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 1/25/10 7:16 AM, bing999 wrote:
> Hi,
>
> here is what i am trying to do:
>
>
> "for i = 0,10 do begin
>
> if i eq 0 then begin
> plot,x1,y1,........
> plot,w1,z1,........
> .............
> endif else begin
> oplot,x2,y2
> oplot,w2,z2
> ..................
> endelse
>
> endfor"
>
> but i want the "oplot,x2,y2" to overplot the "plot,x1,y1,........" ,
> the "oplot,w2,z2" to overplot " plot,w1,z1,........" and so on; that
> is to say, i want that each "oplot" command applies to the
> corresponding "plot" procedure.
> Whereas when i do the script written above, it overplots everything on
> the last plot.
> Is there any way to allocate a name/number to each "plot" procedure in
> order to overplot the corresponding thing on it? like:
>
>
> "for i = 0,10 do begin
>
> if i eq 0 then begin
> plot,x1,y1,NAME=1
> plot,w1,z1,NAME=2
> .............
> endif else begin
> oplot,x2,y2,NAME=1
> oplot,w2,z2,NAME=2
> ..................
> endelse
>
> endfor"
>
>
> Thank you!

I think you want something like:

if (i eq 0) then begin
window, /free
win1 = !d.window
plot, x1, y1

window, /free
win2 = !d.window
plot, w1, z1

...
endif else begin
wset, win1
oplot, x2, y2

wset, win2
plot, w2, z2

...
endelse

Mike
--
www.michaelgalloy.com
Research Mathematician
Tech-X Corporation
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: BSQ to BIL
Next Topic: Re: Extract / interpolate in 3d atmospheric field

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

Current Time: Wed Oct 08 19:16:55 PDT 2025

Total time taken to generate the page: 0.00405 seconds