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

Home » Public Forums » archive » Overplotting on several graphs
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Overplotting on several graphs [message #3196 is a reply to message #3104] Fri, 18 November 1994 05:20 Go to previous message
sterner is currently offline  sterner
Messages: 106
Registered: February 1991
Senior Member
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
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Eigensystems in IDL
Next Topic: linear regression

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

Current Time: Sun Oct 12 12:07:33 PDT 2025

Total time taken to generate the page: 0.80029 seconds