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

Home » Public Forums » archive » positioning oplots
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
positioning oplots [message #450] Tue, 04 August 1992 10:24 Go to next message
jat is currently offline  jat
Messages: 4
Registered: August 1992
Junior Member
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.

Some solutions I've tried:
(1) Setting !p.position to the axes endpoints before
calling 'oplot'... Same result.
(2) I only really generate just one column of plots,
Thus I figured that I can adjust the data to appear on a plot other
than the last one while it is still relative to the last plot. This
sort of works, but I can tell my data is off a little bit.

If anyone has any suggestions or solutions, please e-mail to me.
--
Jatinder Singh 916-653-7564
jat@water.ca.gov ...ucbvax!ucdavis!caldwr!jat
Any opinions expressed are my own; they do not represent the DWR.
Re: positioning oplots [message #451 is a reply to message #450] Wed, 05 August 1992 08:36 Go to previous message
jat is currently offline  jat
Messages: 4
Registered: August 1992
Junior Member
Thank you all for responding. Most of you were correct in
suggesting that '!p.multi(0)' had to be reset to move the plots
around. However, the solution is more involved than that.

I think I misled (myself included), by asking for a solution
to positioning 'oplot'. The actual (simplest) solution is to set
'!p.multi(0)' to the correct plot, and use 'PLOT',and set x(y)style to
at least 4 to inhibit the axes from redrawing. This way the 'PLOT'
appears as an 'oplot' because the axes don't flicker.

Resetting '!p.multi(0)' doesn't have the desired affect on
'oplot'. Maybe in the next release 'oplot' can be expanded to allow
positioning with multiple plots.

Thanks to
Jim P.
pendleton@ossenu.astro.nwu.edu

for the following:

------------------------------------------------------------ --------------
x=findgen(20)
y = x
xrange = [min(x), max(x)]
yrange = [min(y), max(y)]
y2 = sqrt(y)
!p.multi=[0,2,2,0,0]
for i= 0, 3 do begin
plot,x,y,xstyle=1,ystyle=1,xrange=xrange,yrange=yrange,/noda ta
endfor
for i = 0, 3 do begin
plot,x,y2,xstyle=5,ystyle=5,xrange=xrange,$
yrange=yrange,/noerase
!p.multi=[3-i,2,2,0,0]
endfor
for i = 0, 3 do begin
plot,x,y,xstyle=5,ystyle=5,xrange=xrange,yrange=yrange,/noer ase
!p.multi=[3-i,2,2,0,0]
endfor
end


--
Jatinder Singh 916-653-7564
jat@water.ca.gov ...ucbvax!ucdavis!caldwr!jat
Any opinions expressed are my own; they do not represent the DWR.
Re: positioning oplots [message #452 is a reply to message #450] Tue, 04 August 1992 14:46 Go to previous message
isaacman is currently offline  isaacman
Messages: 20
Registered: June 1992
Junior Member
In article <JAT.92Aug4102459@locke.water.ca.gov>, jat@water.ca.gov (Jatinder Singh) writes...
>
> Does anyone know how to position 'oplots' ?
>
> Result: all my plots for subsequent frames end up in the last
> plot. 'position' seems to have no effect.


Try resetting the first parameter of !p.multi.

Rich Isaacman
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: positioning oplots
Next Topic: IDL Style Guide, Automatic Formatting

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

Current Time: Fri Oct 10 10:53:16 PDT 2025

Total time taken to generate the page: 0.88173 seconds