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

Home » Public Forums » archive » Re: Figuring out axis range?
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: Figuring out axis range? [message #28477] Wed, 12 December 2001 07:21 Go to previous message
bowler is currently offline  bowler
Messages: 7
Registered: February 1998
Junior Member
David Fanning <david@dfanning.com> writes:
> Bruce Bowler (bbowler@bigelow.org) writes:
>
>> I have some data that I'm trying to plot where the xaxis data range is (from min and max) [0,3.19377] and the yaxis range is [-85,85]. The y axis values are fixed, the x
>> axis values change depending on the data set. Sometimes, the plot that results from plot,x,y,yrange=[-90,90],/ystyle has an x axis that starts at 0, sometimes it starts at -
>> 1 (in the particular case shown here, the range plotted is [-1,5]). I'd like to force the xaxis to start at 0 (the minimum is *never* negative) and have a "nice" upper bound
>> (so /xstyle doesn't work). Is there an option I'm missing? Is there a routine that will return a "nice" number (like 4, not 3.19377, or 250 if 248.9 is input), is the algorithm
>> that IDL uses to determine plot ranges documented anywhere?
>
> For a "nice number" axis range that always starts at 0,
> I'd try setting XRANGE=[0,Max(data)], with XSTYLE=0.
> The algorithm IDL uses is not documented anywhere I know
> about, but a "pretty axis" is more-or-less IDL's thing,
> and always when you least expect it. :-)

Tried that, same result, but I found a routine called nicenumber :-) at in the
JHU-APL archive. That, in conjunction with /xstyle comes very close to what
I'm looking for.

Bruce
[Message index]
 
Read Message
Read Message
Previous Topic: [call_external] how to use it ?
Next Topic: !pi: Stored as a float

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

Current Time: Fri Oct 10 10:16:19 PDT 2025

Total time taken to generate the page: 0.47496 seconds