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

Home » Public Forums » archive » Re: multiple plots with different ranges
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: multiple plots with different ranges [message #13647] Fri, 20 November 1998 00:00
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
J.D. Smith (jdsmith@astrosun.tn.cornell.edu) answers
John Boccio's question with this:

> Just save the !X and !Y system variables and reset them before
> oplotting:

I don't know why at the moment, but I've always been in the
habit of saving !X, !Y, and !P. I *think* there is something
in !P that also needs to be restored when moving from one
plot to the other, but maybe this is one of my old wive's
tales. ;-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Progamming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: multiple plots with different ranges [message #13648 is a reply to message #13647] Fri, 20 November 1998 00:00 Go to previous message
J.D. Smith is currently offline  J.D. Smith
Messages: 214
Registered: August 1996
Senior Member
John Boccio wrote:
>
> Hi,
>
> I would like to be able to plot as I calculate the points
> for three curves in three different windows with three
> different ranges on the axes.
>
> .....
> .....
> ;set up windows
> window,1
> plot,......xrange = ...., yrange=....,.....,/nodata
> window,2
> plot,......xrange = ...., yrange=....,.....,/nodata
> window,3
> plot,......xrange = ...., yrange=....,.....,/nodata
> ;loop to generate points
> ;inside loop
> wset,1
> oplot,......
> wset,2
> oplot,......
> wset,3
> oplot,......
> .......
> .......
>
> The curves plot correctly in each separate window, but
> and the axis labes on the screen are the right ones for
> each window, but
>
> the xrange and yrange values used in all windows correspond
> to window 3 values..... the last time the range values were set!!!
>
> how can I get different range values to correctly appear in each
> window?
>
> I know I can plot all the data at the end of the loop into three
> separate windows, but we really want students to see the three
> curves being generate dat the same time point by point.
>
> Thanks,
>
> John Boccio
> boccio@swarthmore.edu

Just save the !X and !Y system variables and reset them before
oplotting:

window,1
plot,...
x1=!X & y1=!Y
window,2
plot,...
x2=!X & y2=!Y
window,3
plot,...
x3=!X & y3=!Y
...
wset,1
!X=x1 & !Y=y1
oplot,....
...

Good luck,

JD

--

J.D. Smith |*| WORK: (607) 255-5842
Cornell University Dept. of Astronomy |*| (607) 255-6263
304 Space Sciences Bldg. |*| FAX: (607) 255-5875
Ithaca, NY 14853 |*|
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Structure in argument?
Next Topic: character size in normal coordinates

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

Current Time: Sat Oct 11 10:11:12 PDT 2025

Total time taken to generate the page: 0.71992 seconds