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 #69675 is a reply to message #69611] Wed, 03 February 2010 18:26 Go to previous message
cgguido is currently offline  cgguido
Messages: 195
Registered: August 2005
Senior 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

Is this what you mean?

plot, p,q, xs=8, yr=[-1,1], color=fsc_color('green')
oplot, x/50*1000, y, color=fsc_color('blue')
axis, /noerase, /xaxis, xrange=[0,50], color=fsc_color('blue')

-Gianguido
[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: Sat Oct 11 20:26:53 PDT 2025

Total time taken to generate the page: 0.40467 seconds