Different scales in the same plot [message #44255] |
Thu, 02 June 2005 14:02  |
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   |
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   |
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
|
|
|
|