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

Home » Public Forums » archive » Re: overlaying two plots
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: overlaying two plots [message #69609 is a reply to message #69605] Thu, 04 February 2010 16:40 Go to previous messageGo to previous message
munka is currently offline  munka
Messages: 36
Registered: December 2009
Member
On Feb 3, 7:11 pm, "Mr.G" <gameplay...@gmail.com> wrote:
> Dear All,
>
> Say I have two set of data:
>
> (1)
> x=findgen(101)*0.5
> y=sin(x)
>
> (2)
> p=findgen(501)*2
> q=exp(-p/500)
>
> Now, I want to overlay
> "plot,x,y"
> and
> "plot,p,q"
> on the same plot.
>
> I can not use oplot, since if I:
> "plot,p,q
> oplot,x,y"
> I will get very funny plots.
>
> What I want is the figure has two axis:
> axis, xaxis=1,range=[0,50]
> then, oplot, x,y "as if the range determined by p q changed to [0,50]"
>
> Is that possible in IDL?
>
> G

You could try doing

plot,p,q
plot,x,y,/noerase,ystyle=8,xstyle=8

The noerase keyword should simply plot one on top of the other... I
think the y/xstyle you want (it should not re-plot the axes). There
is a way to get the y-axis lable on the right side. Look up some
graphics keywords for plot.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL without X11?
Next Topic: Using XYOUTS to substitute numbers for symbols on scatter plots: a caveat

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

Current Time: Sun Oct 12 12:21:59 PDT 2025

Total time taken to generate the page: 0.16239 seconds