Re: positioning oplots [message #445 is a reply to message #444] |
Wed, 05 August 1992 07:18   |
thompson
Messages: 584 Registered: August 1991
|
Senior Member |
|
|
In article <BsIDJo.8LE@news.larc.nasa.gov>, zawodny@arbd0.larc.nasa.gov (Dr. Joseph M Zawodny) writes...
> You can cure the problem of all the plots endding up in the last plot
> box by changing the first element of !p.multi. For instance if you have set
> !p.multi = [0,2,3,0,0] previously and plotted six or fewer plots and now wish
> to overplot something in the first plotbox, then set !p.multi(0) = 6 (or 5 for
> the second plot box etc.) If the x(y).range vary from plot to plot you will
> also have to reestablish the correct coordinate system (data to device mapping)
> with a call to plot like
>
> PLOT,[0],xrange=[xmin,xmax],yrange=[ymin,ymax],xstyle=5,ysty le=5,/nodata
>
> This call should only reset x(y).crange and !p.clip (and a few related things)
> without redrawing anything (you may also have to set the titles to the null
> string).
Several people have suggested that one needs to reset the first parameter of
!P.MULTI. However, as far as I can tell, this only works for overplotting if
one uses a command such as above. Even if the X and Y ranges are the same for
each plot, unless a PLOT command like the above is used, then the OPLOTs do not
end up in the right place. This is because other system variables such as
!X.WINDOW and !X.S do not get reset until a plot is done.
Also, the above command should also include a /NOERASE switch in case
!P.MULTI(0) = 0.
I will point out that the X and Y ranges used in the above command can be
obtained from the system variables !X.CRANGE and !Y.CRANGE immediately after
the initial plots, i.e.
!P.MULTI = ... ;Start first plot
PLOT, ...
XRANGE1 = !X.CRANGE
YRANGE1 = !Y.CRANGE
and then
!P.MULTI = ...
PLOT,XRANGE=XRANGE1,YRANGE=YRANGE1, ...
OPLOT, ...
Bill Thompson
|
|
|