# [Matrix-SIG] algorithm for intelligent axis scaling?

**Alexander Lawhead
**
alawhead@vcn.bc.ca

*Thu, 18 Mar 1999 11:47:03 -0800 (PST)*

This is not directly a NumPy question, but I figured that the best answer
might come from this group. :) I'm looking for a simple algorithm for
generating intelligent axis scalings for a graph. Basically what I need is
the axis minimum, axis maximum, and step length between ticks given the
minimum data value, maximum data value, and suggested number of ticks.
By intelligent, I mean reasonably intuitive rounding for the axis labels!
This should be easy, but I'm afraid I've been spoiled by automagical
plotting in countless canned graphics packages. Any help would be
appreciated.
Thanks,
Alexander