I was thinking about the way the labels are formatted. Some of the numbers I work with are large(10^10) and small (10^-10), and the formatting wasnt quite right. I am running the following as a test:
from matplotlib.matlab import *
from numarray import array
b = array(range(10))*1e-5+1e-4
in ticker.py, in ScalarFormatter, what is the purpose of this routine?
# if the value is just a fraction off an int, use the int
if x<=10000: return '%d' % long(x + 0.5)
else: return '%1.0e'%long(x)
If commented out, the labels are formatted appropriately as exponentials, otherwise, the level of precision can often not be useful. Also, in the exponential formatting block, might this
if d < 1e-3: fmt = '%1.3f'
if d < 1e-2: fmt = '%1.3e'
One final suggestion, for formatting the exponential component:
m = self._zerorgx.match(s)
s = m.group(1)
if m.group(2) is not None:
## s += m.group(2)
s += m.group(2)[:2]+str(int(m.group(2)[2:])) ## my hack to make 3e003 look like 3e3. (Whats the "right way"?)
s = s.replace('+', '')