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

Home » Public Forums » archive » Re: OPLOT in multiple plots
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
Re: OPLOT in multiple plots [message #3166] Wed, 23 November 1994 10:11
russell is currently offline  russell
Messages: 4
Registered: April 1994
Junior Member
I think someone just responded to this question. Here's the answer that I saved:

Article: 3334 of comp.lang.idl-pvwave
Newsgroups: comp.lang.idl-pvwave
Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!spool.mu.edu! uwm.edu!caen!saimiri.primate.wi
sc.edu!aplcenmp!strdev.jhuapl.edu!sterner
From: sterner@strdev.jhuapl.edu (Ray Sterner)
Subject: Re: Overplotting on several graphs
Message-ID: <sterner.785164815@strdev.jhuapl.edu>
Sender: usenet@aplcenmp.apl.jhu.edu
Nntp-Posting-Host: strdev.jhuapl.edu
Organization: Johns Hopkins Continuing Professional Programs
References: <1994Nov17.123111.3468@lugb.latrobe.edu.au>
Date: Fri, 18 Nov 1994 13:20:15 GMT
Lines: 34

ECSPRS@LURE.LATROBE.EDU.AU (Paul Smith) writes:

> I would like to plot data on say 5 graphs as I read it from a file with
> overplotting. ie. the first five sets of data are plotted on separate graphs
> (in the one window) and the next five sets of data are plotted on top of the
> first five plots. The problem with oplot is that it only works with the last
> plot command, so is there any way to go from graph 5 back up to graph 1 and do
> an overplot? I'm anticipating reading a lot of data so I don't really want to
> read the entire file and then plot at the end. Also five passes through the
> file seems a rather inefficient way to go.
> Thanks,
> Paul

To overplot an a plot done before the last one you need to restore
several system variables to the state they had just after that plot.
The system variables are !x, !y, and !p. Save them after a plot,
do your other plots, then restore them to do an overplot.
Here is a simple example:

!p.multi=[0,2,2]
plot,[0,10],titl='A' & xa=!x & ya=!y & pa=!p
plot,[0,10],titl='B' & xb=!x & yb=!y & pb=!p
plot,[0,10],titl='C' & xc=!x & yc=!y & pc=!p
plot,[0,10],titl='D' & xd=!x & yd=!y & pd=!p
!x=xa & !y=ya & !p=pa & oplot,[10,5]
!x=xc & !y=yc & !p=pc & oplot,[5,0]

You may want to make a procedure to save and restore the plot state by some
index number.

Ray Sterner sterner@tesla.jhuapl.edu
Johns Hopkins University North latitude 39.16 degrees.
Applied Physics Laboratory West longitude 76.90 degrees.
Laurel, MD 20723-6099
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: comp.lang.idl-pvwave archive?
Next Topic: Middle mouse button under Windows?

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

Current Time: Wed Oct 08 13:44:36 PDT 2025

Total time taken to generate the page: 0.00412 seconds