[matplotlib-devel] 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.

A bug was reported for MPL-0.81. You will get the following error if an axis
has only one tick located at 0.0:

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

The fix is in CVS. If you get don't have access to CVS, you can replace lines
322 and 323:

            if locs[0] > locs[-1]: oom = math.floor(math.log10(locs[0]))
            else: oom = math.floor(math.log10(locs[-1]))

with

            if locs[0] > locs[-1]: val = locs[0]
            else: val = locs[-1]
            if val == 0: oom = 0
            else: oom = math.floor(math.log10(val))

Darren

ยทยทยท

On Sunday 12 June 2005 11:56 am, Darren Dale wrote:

cfuller@...646... wrote: