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

Home » Public Forums » archive » Re: Multiple Axes
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: Multiple Axes [message #47220] Mon, 30 January 2006 18:07 Go to next message
btt is currently offline  btt
Messages: 345
Registered: December 2000
Senior Member
vorticitywolfe@gmail.com wrote:
> I have a quick question that may seem rather trivial, but I can't seem
> to figure out how to make it work. I'm trying to plot a two
> dimensional plot which includes three arrays with their own unique axis
> (e.g., precip rate, relative humididty, and temperature); however,
> using the axis command I can only define two axis. I would like the
> 3rd axis to be located next to the far right side of the plot, so I
> tried the position keyword, but that doesn't work because it begins a
> new plotting window at the far right side and doesn't use the ranges
> indicated on the first window. Does anyone know the solution? Thanks
> for your help! Jon
>

Does this do what you want?

****START
n = 360
t = TIMEGEN(n, START=JULDAY(1,1,2006), STEP = 1, UNIT = 'DAY')

x = SIN(!DTOR*Findgen(n))
y = SIN(!DTOR*Findgen(n) + !PI/4.) / 2.
z = x-y

pos = [0.2, 0.2, 0.8, 0.9]

PLOT, t,x, $
POSITION = pos, $
XTICKUNIT = 'time', $
YTITLE = 'x'

AXIS, 0.1, 0.2, /NORM, /SAVE, $
YAXIS = 0, $
YRANGE = [-0.5,0.5], $
YTITLE = 'y'
OPLOT, t,y, THICK = 2

AXIS, 0.9, 0.2, /NORM,/SAVE, $
YAXIS = 1, $
YRANGE = [-2,2], $
YTITLE = 'z = x-y'
OPLOT, t, z, LINESTYLE = 1

*****END
Re: Multiple Axes [message #47517 is a reply to message #47220] Tue, 14 February 2006 08:19 Go to previous message
vorticitywolfe is currently offline  vorticitywolfe
Messages: 19
Registered: January 2006
Junior Member
Yes! Thank you! The part I was missing was the call in axis
(axis,X*,Y*) where the *'s indicate the position of the third axis.
Thanks again!
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: weighted Gaussian distribution mean
Next Topic: readf help!

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

Current Time: Wed Oct 08 09:13:45 PDT 2025

Total time taken to generate the page: 0.20214 seconds