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

Home » Public Forums » archive » Different scales in the same plot
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
Different scales in the same plot [message #44255] Thu, 02 June 2005 14:02 Go to next message
caitouer is currently offline  caitouer
Messages: 21
Registered: June 2005
Junior Member
Hi, guys,
I just wonder if anyone tried to plot several scales in the same plot.
For example, plot two arrays with range [0,100] and [500,2000].
Moreover, mark the values on the left and right respectively if
possible. Right now I multipled the second array by 0.1 first and then
subtracted by 50. There might be a better way to do this...

x=[0,1,2,3,4]
a=[50,59,46,29,30]
b=0.1*[728,1061,1382,1620,1630]-50
PLOT,x,a,yrange=[20,150]
OPLOT,x,b

Thanks a lot,
Caitouer
Re: Different scales in the same plot [message #44329 is a reply to message #44255] Mon, 06 June 2005 05:42 Go to previous messageGo to next message
Benjamin Hornberger is currently offline  Benjamin Hornberger
Messages: 258
Registered: March 2004
Senior Member
maarten wrote:
>
>> Just curious,
>>
>> do you know how to do the same trick with iTools?
>>
>> Cheers,
>>
>>
>> Thomas
>
>
>
> In iplot, a way to do this (perhaps there is an easier way I am not
> aware of), is by inserting a new dataspace.
> Plot the first series, e.g. iplot,a then in iplot click on edit->insert
> new dataspace.
> Type at the commandline iplot,b,/overplot.
> Then in iplot, the relevant axes can be hidden, by double clicking on
> the data. So you leave axes 1 and 3 for the first set and axes 2 and 4
> for the second dataset.

This is described in one of the iTools Tutorials, which you can find on
the RSI website (you'll have to sign up to download them).

Benjamin
Re: Different scales in the same plot [message #44330 is a reply to message #44255] Mon, 06 June 2005 04:25 Go to previous messageGo to next message
maarten is currently offline  maarten
Messages: 30
Registered: April 2002
Member
> Just curious,
>
> do you know how to do the same trick with iTools?
>
> Cheers,
>
>
> Thomas


In iplot, a way to do this (perhaps there is an easier way I am not
aware of), is by inserting a new dataspace.
Plot the first series, e.g. iplot,a then in iplot click on edit->insert
new dataspace.
Type at the commandline iplot,b,/overplot.
Then in iplot, the relevant axes can be hidden, by double clicking on
the data. So you leave axes 1 and 3 for the first set and axes 2 and 4
for the second dataset.
Hope this helps,

cheers maarten
Re: Different scales in the same plot [message #44377 is a reply to message #44329] Thu, 09 June 2005 08:39 Go to previous message
caitouer is currently offline  caitouer
Messages: 21
Registered: June 2005
Junior Member
I never used iplot before. I tried that moments ago. It is very
convenient. I almost got what I wanted. I will keep on trying. Thanks a
lot.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: annotations in a contour plot.
Next Topic: Re: problem restoring a save file from within a procedure

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

Current Time: Wed Oct 08 18:13:53 PDT 2025

Total time taken to generate the page: 0.00545 seconds