Re: multi window switching [message #8540 is a reply to message #8462] |
Tue, 18 March 1997 00:00  |
peter
Messages: 80 Registered: February 1994
|
Member |
|
|
Daniel Williams (williams@skrymir.srl.caltech.edu) wrote:
: I would like to open a number of plots with the !p.multi keyword, and
: then place data points on each plot. Sounds simple, but then I would
: like to add more data to each plot as time goes by.
: The trouble is, I do not know how to tell IDL "go back to the first
: (or nth) plot, and overplot there". This is such a trivial-seeming
: task, can it be done? Each point that must be plotted cannot be
: stored, so I really need to updata these plots, not make new ones.
You can do it by saving the !x, !y, !z and !p system variables after
performing each of the N plots, then setting these system variables back
to the saved values before over plotting the new points.
E.g. Try
IDL> !p.multi=[0,2,2]
IDL> plot, findgen(10)
IDL> x = !x
IDL> y = !y
IDL> z = !z
IDL> p = !p
IDL> plot, findgen(10)
IDL> !x =x
IDL> !y = y
IDL> !z = z
IDL> !p= p
IDL> oplot, 10-findgen(10)
It might seem that you could get away with saving only !p, but I think
this will only work if all the plots have the same axis ranges.
Peter
|
|
|