From: David Simpson <david.simpson@me...>  20070425 06:59:59

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 