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

Home » Public Forums » archive » Re: multiple Y-axis for 2D plots
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: multiple Y-axis for 2D plots [message #15771 is a reply to message #15765] Tue, 08 June 1999 00:00 Go to previous messageGo to previous message
Robert King is currently offline  Robert King
Messages: 9
Registered: March 1999
Junior Member
noymer@mozart.ceped.ined.fr wrote in article
<7jj5ai$kin$1@nnrp1.deja.com>...
> Dear IDL newsgroup,
>
> I have data like this: a year vector (for the X-axis) and two
> data vectors (for the Y values of two curves). Now, the two data
> vectors are to be displayed on the same graph, but they have radically
> different Y-scales. Rather than multiply the smaller by, say 100, I
> would like to display them each on their own axis. By this, I mean
> just like the lower left panel of figure 10-12 in the "Using IDL"
> manual (p.200 in my version), except imagine the first curve being the
> distribution of temperature (as drawn), and the RH Y-axis not being
> Celsius, but being mmHg, and then imagine a second curve, giving the
> distribution of atmospheric pressure for the same locale. The LH
> Y-axis is for temp; the RH Y-axis is for pressure.
>
> Some people feel that such graphs are unreadable because they don't
> know without careful inspection of the caption which line goes with
> the RH-Y-axis and which goes with the LH-Y-axis. They have a point;
> the way out is to do two separate panels, closely stacked. But I
> would like to know if this is at least doable.
>
> From the documentation for axis (etc), it was unclear (at least to me)
> if this was possible, and all my experiments failed.
>
> Thanks in advance if anyone has any thoughts.
>
> Best,
> Andrew.
>

Andrew,

Sorry to everyone if someone's already posted an answer to this one -
my newsfeed is somewhat slow and tempermental to say the least... :(

I've taken this from "IDL Programming Techniques" by DWF. (Page 31).
I'm also quite new to IDL and found this book a wonderful aid to
programming - I use it practically every half hour that I'm programming !!
Well worth getting a copy, I'm sure that David will send you the details,
otherwise visit his web site at http://www.dfanning.com/

"data_set_one" would be your temp Vs Time data
"data_set_two" is the press Vs Time data.


Plot, data_set_one, YStyle=8, YTitle='Solid Line :Temp (deg C)' ,$
Position=[0.15,0.15,0.85,0.95]
Axis, YAxis=1, YRange=[0,200], /SAVE, YTitle=' Dashed Line : Pressure
(mmHg)'
OPlot, data_set_two, LineStyle=2


Hope that this helps

Regards,

Robert
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: dll's in windows
Next Topic: Redhat Linux 6.0 troubles / X11

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

Current Time: Wed Oct 08 19:56:22 PDT 2025

Total time taken to generate the page: 0.00411 seconds