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

Home » Public Forums » archive » Two x-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
Two x-axes [message #152] Wed, 30 October 1991 14:42 Go to next message
eparvier is currently offline  eparvier
Messages: 4
Registered: October 1991
Junior Member
Hi,

Does anyone know of a relatively easy way to make a plot
in IDL have two different x-axes or scales? It is rather
common in textbooks and journal articles to see two curves on the
same plot, sharing the same y-axis scaling, but with different
corresponding x-axes (usually one on top and one on the bottom).

This could be done brute force, of course, but I was
wondering if there were any library routines to do this in a
general manner, instead of on a case-by-case basis.

Thanks for any advice,
Frank
Re: Two x-axes [message #251 is a reply to message #152] Thu, 31 October 1991 09:32 Go to previous message
jennifer is currently offline  jennifer
Messages: 8
Registered: October 1991
Junior Member
eparvier@tramp.Colorado.EDU (EPARVIER FRANCIS G) writes:

< Does anyone know of a relatively easy way to make a plot
in IDL have two different x-axes or scales? It is rather
common in textbooks and journal articles to see two curves on the
same plot, sharing the same y-axis scaling, but with different
corresponding x-axes (usually one on top and one on the bottom).

This could be done brute force, of course, but I was
wondering if there were any library routines to do this in a
general manner, instead of on a case-by-case basis.>

This can be done fairly easily with a combination of calls to
PLOT and AXIS with various keywords, such as

;plot first set of data with x axis on bottom, y axis on left, no top axis
plot,x,y,/noerase,xstyle=8
;plot second set of data with x axis on top, same y axis
plot,x2,y,/noerase,xstyle=4,/noerase
axis,xaxis=1

There are a lot of options with these two procedures, so you should
be able to get what you want.

Jennifer Dungan jennifer@vessna.arc.nasa.gov
MS 242-4
NASA Ames Research Center
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Size of images output with CGM in Wave
Next Topic: !Path re-parser anyone?

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

Current Time: Wed Oct 08 15:06:42 PDT 2025

Total time taken to generate the page: 0.00646 seconds