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 #31795 is a reply to message #31794] Tue, 20 August 2002 06:12 Go to previous messageGo to previous message
Robert Stockwell is currently offline  Robert Stockwell
Messages: 74
Registered: October 2001
Member
helen wrote:
> Hello, All,
>
> 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
>
> ;****************************

How about:


arrayT = fltarr(11)
arrayX = fltarr(11)
arrayY = fltarr(11)

window, 1
plot,[0,10],[-10,10], /NoData,title='plot 1'
x1 = !X & y1 = !Y & p1 = !P

window,0
plot,[0,10],[-5,5], /NoData,title='plot 2'
x2 = !X & y2 = !Y & p2 = !P


for I=1, 10 Do begin
arrayY[I] = cos(I+1)
arrayX[I] = sin(I+1)
arrayT[I] = I
endfor
for I=0, 10-1 Do begin
wset, 1
plots,arrayT[I], arrayX[I]
plots,arrayT[I+1], arrayX[I+1], /continue

wset, 0
plots,arrayT[I], arrayY[I]
plots,arrayT[I+1], arrayY[I+1], /continue

endfor
end


Cheers,
bob
[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 18:06:53 PDT 2025

Total time taken to generate the page: 0.55876 seconds