Re: positioning oplots [message #447 is a reply to message #446] |
Tue, 04 August 1992 13:26  |
kevin
Messages: 17 Registered: August 1992
|
Junior Member |
|
|
jat@water.ca.gov (Jatinder Singh) writes ...
> Does anyone know how to position 'oplots' ?
>
> I'm trying to analyze time-series data by plotting locations and
> animating against time.
>
> My particular problem arises when I have more than one plot
> per window (setting !p.multi to something other than 0).
>
> At the starting frame, I 'plot' the axes with '/nodata'. I
> also save the axis endpoints from !x(y).window, in an array.
>
> In subsequent frames I 'oplot' the data, erase it after a delay,
> and 'oplot' the next frame. I try to position the data into its
> respective plot by using 'position' in the 'oplot' routine with
> 'position' set to the saved axes for that plot. I use 'oplot' because
> it's somewhat faster than 'plot', I only need to change the data, not the
> axes, and it gets rid of the flickering associated with 'plot' in a loop.
>
> Result: all my plots for subsequent frames end up in the last
> plot. 'position' seems to have no effect.
I had a similiar problem doing a similiar aplication. Solution: don't use
!p.position. Before each oplot, insert a !p.multi such that it is set so
that the next plot will be in the location you want. Example:
(assuming the axis' have already been drawn):
!p.multi=[2,1,3,0,0]
oplot,data
The fragment above will do an overplot on the middle plot of a 3 plot window
Kevin Anderson
|
|
|