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

Home » Public Forums » archive » Re: How to make this work? Oplot question.
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: How to make this work? Oplot question. [message #4850 is a reply to message #4845] Wed, 02 August 1995 00:00 Go to previous message
rmmoss is currently offline  rmmoss
Messages: 12
Registered: August 1995
Junior Member
In article <1995Aug2.161654.29779@news.wrc.xerox.com>, jeyadev@kaveri (Surendar Jeyadev) writes:
|> I would greatly appreciate if someone can give me a hint on how to
|> accomplish the following task in PV Wave.
|>
|>
|> x = findgen(100)/10.0 x = findgen(100)/10.0
|> y = exp(-0.1*x)*sin(4*x)
|> plot, x, y ; plot decaying sin in !d.window=0
|>
|> wset, 1
|> y = exp(0.1*x)*cos(4*x)
|> plot, x, y ; plot rising cos in !d.window=1
|>
|> wset, 0
|> oplot, x, 0.1*x ; plot straight line in !d.window=0
|>
|> end
|>
|> So, the question is, can I accomplish what I would like to do in a
|> simple way. Or do I have to store the scaling information for window "0"
|> and set that each time I return to it? Unfortunately, the scale factors
|> are vastly different for the two windows.
|>
|> Thanks
|> --
|>
|> Surendar Jeyadev jeyadev@wrc.xerox.com

Yep, saving the plotting system variables is exactly what you do. Its not that
bad, however. The following simple-minded way will suffice.

x = findgen(100)/10.0
y = exp(-0.1*x)*sin(4*x)
plot, x, y

;save the settings
pstate0 = !P
xstate0 = !X
ystate0 = !Y
zstate0 = !Z

wset, 1
y = exp( 0.1*x)*cos(4*x)
plot, x, y

;save new settings
pstate1 = !P
xstate1 = !X
ystate1 = !Y
zstate1 = !Z

;now proceed to overplot at will :)

wset, 0

;restore old settings
!P = pstate0
!X = xstate0
!Y = ystate0
!Z = zstate0

oplot, x, 0.1*X

etc, etc. As usual, there are more complicated ways of doing this, but you
get the idea ;)

Robert M. Moss, Ph.D.
Texaco Inc.
rmmoss@texaco.com

This is not necessarily the opinion of Texaco Inc.
[Message index]
 
Read Message
Read Message
Previous Topic: How to make this work? Oplot question.
Next Topic: Re: WIDGET_OLH (online help) Help!

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

Current Time: Wed Oct 08 19:13:09 PDT 2025

Total time taken to generate the page: 0.00401 seconds