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

Home » Public Forums » archive » Multi Plot and OverPlot
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
Multi Plot and OverPlot [message #5583] Thu, 04 January 1996 00:00
sanjay is currently offline  sanjay
Messages: 5
Registered: April 1993
Junior Member
Please ignore the last posting by me. Overplotting
works if I save !x,!y,!z and !p and reset to those values
later.

Thanks Ken and rest of the people who responded.

-sanjay
Re: Multi Plot and OverPlot [message #5587 is a reply to message #5583] Thu, 04 January 1996 00:00 Go to previous message
Ken Knighton is currently offline  Ken Knighton
Messages: 44
Registered: May 1995
Member
chs11@bonjour.cc.columbia.edu (Carl H Sayres) wrote:
> In article <4cff1o$fkj@mojo.eng.umd.edu>,
> Sanjay K <sanjay@windvane.umd.edu> wrote:
>>
>> I have two plots in a window, and I want to overplot
>> on each of them individually. Is there a way to do this
>> or am I wasting my time?.
>
> Each section of a multi-page window behaves like an individual plotting
> device. So for a two plot page,
>
> plot(...)
> oplot(...)
> oplot(...)
> plot(...)
> oplot(...)
> oplot(...)
>
> should do what you are asking. I don't believe that you can oplot
> to the previous plot once you've made the second plot call, though.
> I'd be happy if someone could demonstrate that I'm wrong about that.
>

Try:

!p.multi=[0,2,0,0,0]
sx=!x & sy=!y & sz=!z & sp=!p ;Save to restore later on
plot,...
sx1=!x & sy1=!y & sz1=!z & sp1=!p ;Save state of first plot
plot,...
sx2=!x & sy2=!y & sz2=!z & sp2=!p ;Save state of second plot

!x=sx1 & !y=sy1 & !z=sz1 & !p=sp1 ;Restore context of first plot
oplot,...
oplot,...

I think that all you really need to save is !x.s, !y.s, and !p.clip to
make this work, but I make it a practice of saving everything to
prevent any problems.

When a plot is produced, a data coordinate system is established and the
factors to convert between the data coordinate system and normalized
coordinates is stored in the !x.s and !y.s arrays. The oplot command
uses these values to plot the data over the current plot. When a
multiple plot is produced, the last plot command given is what sets
up the !x.s and !y.s (and !z.s) vectors. This means that further
oplot commands will be over the last plot produced unless these vectors
are reset to values for a prior plot.

The !p.clip vector is set to contain the device coordinates of a clipping
window that prevents data that maps outside of this window from being
drawn, therefore it must be changed from one window from the next. You
can also set !p.noclip=1 to prevent clipping from occurring.

I hope this helps.

Ken Knighton knighton@gav.gat.com knighton@cts.com
Fusion Division
General Atomics
San Diego, CA
Re: Multi Plot and OverPlot [message #5594 is a reply to message #5583] Thu, 04 January 1996 00:00 Go to previous message
chs11 is currently offline  chs11
Messages: 14
Registered: October 1995
Junior Member
In article <4cff1o$fkj@mojo.eng.umd.edu>,
Sanjay K <sanjay@windvane.umd.edu> wrote:
>
> I have two plots in a window, and I want to overplot
> on each of them individually. Is there a way to do this
> or am I wasting my time?.

Each section of a multi-page window behaves like an individual plotting
device. So for a two plot page,

plot(...)
oplot(...)
oplot(...)
plot(...)
oplot(...)
oplot(...)

should do what you are asking. I don't believe that you can oplot
to the previous plot once you've made the second plot call, though.
I'd be happy if someone could demonstrate that I'm wrong about that.

Carl

||---------------------------------------------------------- -----------||
|| Carl H. Sayres || Author of 'The Unofficial Unauthorized ||
|| chs11@columbia.edu || Columbia University OS/2 Homepage' ||
|| || http://www.columbia.edu/~chs11/cuos2.html ||
||---------------------------------------------------------- -----------||
|| Access the Hobbes FTP site through the Hobbes Virtual Mirror ||
|| http://www.columbia.edu/~chs11/hvm.html ||
||______ Team OS/2 !!!! _______________________________________________||
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: call_external under Windows 95
Next Topic: Re: Menubar question

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

Current Time: Wed Oct 08 13:42:24 PDT 2025

Total time taken to generate the page: 0.00587 seconds