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

Home » Public Forums » archive » Irregularly spaced tick-marks on secondary axis.
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Irregularly spaced tick-marks on secondary axis. [message #30478] Wed, 01 May 2002 07:20 Go to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
Hey there,

I like to plot radiance data with respect to frequency (in units of centimetres^-1). However, I
would like to put a wavelength scale (in units of microns [micrometres]) on the top Xaxis. The
relationship between them is very simple but non-linear:

wavelength (um) = 10000.0 / wavenumber (cm^-1)

I have been doing this sort of thing:

FUNCTION wticks, axis, index, value
wavelength = 10000.0d / value
format = '( f5.2 )'
RETURN, STRING( wavelength, FORMAT = format )
END


PLOT, x, y, XSTYLE = 8

AXIS, XAXIS = 1, $
XRANGE = !X.CRANGE ,$
XTICKV = 10000.0d/[ 10d, 11, 12, 13, 14, 15 ], $
XTICKS = 5, $
XSTYLE = 1, $
XTICKFORMAT = 'wticks'

As you can see, the above AXIS command assumes something about the XTICKV values. However, if I
now decide to zoom into the plot such that the x-range falls between, say, 11 and 12 microns --
no wavelength scale is shown since XTICKV doesn't contain fractional wavelength values. Is
there any way to get IDL to set "nice" wavelength values (via a dynamic XTICKV for e.g.) on the
top scale based on the wavenumber range on the bottom scale?

thanx,

paulv

--
Paul van Delst Religious and cultural
CIMSS @ NOAA/NCEP/EMC purity is a fundamentalist
Ph: (301)763-8000 x7274 fantasy
Fax:(301)763-8545 V.S.Naipaul
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Discrete sine transform
Next Topic: Re: bit operations

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

Current Time: Fri Oct 10 04:43:23 PDT 2025

Total time taken to generate the page: 0.55982 seconds