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

Home » Public Forums » archive » Re: plots?
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: plots? [message #31796 is a reply to message #31795] Tue, 20 August 2002 04:51 Go to previous messageGo to previous message
Don J Lindler is currently offline  Don J Lindler
Messages: 19
Registered: April 2001
Junior Member
> I have a problem about using plots. I want to use two plots for two
> different data sets at the same time. If I just use one plots for one
> data set, there is no problem. But when I use two, it doesn't work. It
> seems the two plots interrupt each other. I want to know why?
>
> Thanks very much for any kind of help!
>
> I attach my simple program below:
>
> ;*****************
> pro testPlots
> arrayT = fltarr(11)
> arrayX = fltarr(11)
> arrayY = fltarr(11)
> window, 1
> x1 = !X & y1 = !Y & p1 = !P
> window,2
> x2 = !X & y2 = !Y & p2 = !P
> for i=0, 10 Do begin
> arrayY[i] = cos(i+1)
> arrayX[i] = sin(i+1)
> arrayT[i] = i
> wset, 1
> !X = x1 & !Y = x1 & !P = p1
> plots,arrayT[i], arrayX[i], /continue
> wset, 2
> !X = x2 & !Y = y2 & !P = p2
> plots,arrayT[i], arrayY[i], /continue
>
> endfor
>
> end
>


The /continue is telling the routine to start plotting
from where the last plots was performed.
When you are changing wingows the routine is continuing
the plot from the point where the other window left off.
If you want to plot in this manner, I would suggest letting
your program keep track of where you left off.

for i=0, 10 Do begin
arrayY[i] = cos(i+1)
arrayX[i] = sin(i+1)
arrayT[i] = i
if i gt 0 then begin
wset, 1
!X = x1 & !Y = x1 & !P = p1
plots, arrayT[[i-1,i]], arrayX[[i-1,i]]
wset, 2
!X = x2 & !Y = y2 & !P = p2
plots, arrayT[[i-1,i]], arrayY[[i-1,i]]
end
endfor


Don
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Weighting Function
Next Topic: Re: Frame-rate of IDL's MPEG movies ?

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

Current Time: Fri Oct 10 12:42:03 PDT 2025

Total time taken to generate the page: 2.79578 seconds