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

Home » Public Forums » archive » Re: Different scales in the same plot
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: Different scales in the same plot [message #44253] Thu, 02 June 2005 15:29 Go to previous message
savoie is currently offline  savoie
Messages: 68
Registered: September 1996
Member
"caitouer" <caitouer@yahoo.com> writes:

> 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].
<snip/>
> There might be a better way to do this...
>
> <almost working code removed>
>
> Thanks a lot,
> Caitouer


;; I believe you are looking for the /noerase, and [xy]style keywords in
;; conjunction with the axis function

pro try_this
x = [ 0, 1, 2, 3, 4 ]
a = [ 50, 59, 46, 29, 30 ]
b = [ 728, 1061, 1382, 1620, 1630 ]
PLOT, x, a, yrange = [ 20, 150 ], ystyle = 8, XMARGIN=[ 10, 10 ], xstyle = 1
PLOT, x, b, yrange = [ 700, 1700 ], /NOERASE, ystyle = 4, $
xstyle = 1, XMARGIN=[ 10, 10 ]
axis, /YAXIS
end


See the manual for [xy]style graphics keyword and axis functions.


Hope this helps.

Matt



--
Matthew Savoie - Scientific Programmer
National Snow and Ice Data Center
(303) 735-0785 http://nsidc.org
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Convert hex string to number
Next Topic: MPFIT2DPEAK with constraints

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

Current Time: Wed Oct 08 15:37:41 PDT 2025

Total time taken to generate the page: 0.00357 seconds