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 #31791 is a reply to message #31789] Tue, 20 August 2002 07:37 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
helen (bin_zheng_99@yahoo.com) writes:

> Thanks David for your help. But I still have not solved my problem. My
> problem is whether I can plot two different data in two windows at the
> same time? Because I want to track a target's movement and display its
> x (arrayX) and y (arrayY) position against the time (arrayT) at the
> real time. So that I can see the moving from the plots in these two
> windows. So, I write a simple program to test if I can plot two
> different data (arrayX against arrayT, arrayX against arrayT) at the
> same time and still get correct result? Is there a way to do this?

I think I would drop the CONTINUE keyword and just draw
from the last point to this point:

pro testPlots
arrayT = fltarr(11)
arrayX = fltarr(11)
arrayY = fltarr(11)
window, 1
plot,[0,10],[-10,10], /NoData
x1 = !X & y1 = !Y & p1 = !P
window,2
plot,[0,10],[-10,10], /NoData
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
wset, 1
!X = x1 & !Y = y1 & !P = p1
plots,[arrayT[i-1], arrayT[I]], $
[arrayX[i-1], arrayX[I]]
wset, 2
!X = x2 & !Y = y2 & !P = p2
print, [arrayY[i-1], arrayY[I]]
plots,[arrayT[i-1], arrayT[I]], $
[arrayY[i-1], arrayY[I]]

endfor
end

This works perfectly, as far as I can tell.

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[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 01:18:23 PDT 2025

Total time taken to generate the page: 0.24139 seconds