I also had some trouble with exponents in an axis, getting
0.0 to 3.0 on the axis, with +1.998e3. I wanted the years
1998 to 2001 instead. I solved this using the following code
(with the solution bits commented out):

#!/usr/bin/env python
from pylab import *
# from matplotlib.ticker import FormatStrFormatter

x = array([ 1998, 1999, 2000, 2001 ])
y = array([   2.3, 4.5, 2.6, 7.2 ])

# ax=subplot(111)
plot(x,y)

## Needed to get 2001, not 1+2e3:
# majorFormatter=FormatStrFormatter('%d')
# ax.xaxis.set_major_formatter(majorFormatter)
# show()


Dave



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to