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
Re: Irregularly spaced tick-marks on secondary axis. [message #30561 is a reply to message #30478] Thu, 02 May 2002 05:55 Go to previous message
Ken Mankoff is currently offline  Ken Mankoff
Messages: 158
Registered: February 2000
Senior Member
On Wed, 1 May 2002, Paul Van Delst wrote:
> 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?

Can't you make the inputs to XTICKV a function call (as you say, a
"dynamic XTICKV"), and use !X.CRANGE in that function?

This seems fairly straightforward, so if this is not the solution,
please clarify a bit...

The best analogy I can think of to your problem is "MAP_GRID", which
picks nice gridlines for global views (30 degrees) and also nice
gridlines for close-up views (every .001 degrees if the view small
enough). Is this what you are trying to achieve?

-k.
--
------------------------------------------------------------ ---------------
Ken Mankoff http://lasp.colorado.edu/snoe/
http://lasp.colorado.edu/mars/
http://lasp.colorado.edu/~mankoff/ http://lasp.colorado.edu/marsrobot/
------------------------------------------------------------ ---------------
[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 10:03:54 PDT 2025

Total time taken to generate the page: 1.20031 seconds