Bug in 0.81, demo code included

Looks like a problem with drawing ticks. Attached is code that demonstrates the problem (for me), and the traceback.

I'm using Python 2.4.1, Numeric 23.8, and the stock .matplotlibrc, on win32.

The script runs fine in 0.80.

Cheers,
Chris Fuller

bug-0.81.py (757 Bytes)

bug-0.81.tb (919 Bytes)

cfuller@...239... wrote:

Looks like a problem with drawing ticks. Attached is code that demonstrates the problem (for me), and the traceback.

I'm using Python 2.4.1, Numeric 23.8, and the stock .matplotlibrc, on win32.

The script runs fine in 0.80.

[...]

------------------------------------------------------------------------

Traceback (most recent call last):
File "bug-0.81.py", line 50, in ?
   PlotResults()
File "bug-0.81.py", line 18, in PlotResults
   cvs.draw()
File "C:\Python24\Lib\site-packages\matplotlib\backends\backend_agg.py", line 369, in draw
   self.figure.draw(renderer)
File "C:\Python24\Lib\site-packages\matplotlib\figure.py", line 395, in draw
   for a in self.axes: a.draw(renderer)
File "c:\Python24\lib\site-packages\matplotlib\axes.py", line 1357, in draw
   self.yaxis.draw(renderer)
File "C:\Python24\Lib\site-packages\matplotlib\axis.py", line 530, in draw
   self.major.formatter.set_locs(majorLocs)
File "C:\Python24\Lib\site-packages\matplotlib\ticker.py", line 296, in set_locs
   self._set_orderOfMagnitude(d)
File "C:\Python24\Lib\site-packages\matplotlib\ticker.py", line 323, in _set_orderOfMagnitude
   else: oom = math.floor(math.log10(locs[-1]))
OverflowError: math range error

Sorry about that. I didn't anticipate the case where only one tick is present, and also being equal to zero. The fix has been committed to CVS.

Darren