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 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Different scales in the same plot [message #44253] Thu, 02 June 2005 15:29 Go to next 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
Re: Different scales in the same plot [message #44331 is a reply to message #44253] Mon, 06 June 2005 04:13 Go to previous messageGo to next message
Thomas Pfaff is currently offline  Thomas Pfaff
Messages: 15
Registered: April 2005
Junior Member
savoie@nsidc.org schrieb:
> "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
>
>
>

Just curious,

do you know how to do the same trick with iTools?

Cheers,


Thomas
Re: Different scales in the same plot [message #44379 is a reply to message #44253] Thu, 09 June 2005 08:22 Go to previous messageGo to next message
caitouer is currently offline  caitouer
Messages: 21
Registered: June 2005
Junior Member
It works. Thanks a lot. :)

savoie@nsidc.org wrote:
> "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
Re: Different scales in the same plot [message #44563 is a reply to message #44331] Sun, 26 June 2005 00:50 Go to previous message
Leif-Ronny Isaksen is currently offline  Leif-Ronny Isaksen
Messages: 1
Registered: June 2005
Junior Member
Pfaff. How about some openGL code soon? Time to go back to our morphin
dotted vectors again ye?

Leif-Ronny

(if you dont know who I am, ignore)

Thomas Pfaff wrote:
> savoie@nsidc.org schrieb:
>> "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
>>
>>
>>
>
> Just curious,
>
> do you know how to do the same trick with iTools?
>
> Cheers,
>
>
> Thomas
  Switch to threaded view of this topic Create a new topic Submit Reply
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 13:44:07 PDT 2025

Total time taken to generate the page: 0.01200 seconds