From: O'Keefe, M. <Mic...@nr...> - 2006-03-23 14:32:42
|
Line 733 in ticker.py in matplotlib 0.87.2 has a potential divide by = zero error: var =3D dv/max(abs(vmin),abs(vmax)) I've triggered it with the following: import pylab import numpy as np t =3D np.array([0.,1.,2.,3.],float) a =3D np.array([0.,0.,0.,0.],float) pylab.plot(t,a) The error is: Traceback (most recent call last): File "<stdin>", line 1, in ? File "C:\Python24\Lib\site-packages\matplotlib\pylab.py", line 2018, = in plot ret =3D gca().plot(*args, **kwargs) File "C:\Python24\Lib\site-packages\matplotlib\axes.py", line 2790, in = plot self.autoscale_view() File "C:\Python24\Lib\site-packages\matplotlib\axes.py", line 817, in = autoscal e_view self.set_ylim(locator.autoscale()) File "c:\python24\lib\site-packages\matplotlib\ticker.py", line 798, = in autosc ale return take(self.bin_boundaries(dmin, dmax), [0,-1]) File "c:\python24\lib\site-packages\matplotlib\ticker.py", line 768, = in bin_bo undaries scale, offset =3D scale_range(vmin, vmax, nbins) File "c:\python24\lib\site-packages\matplotlib\ticker.py", line 733, = in scale_ range var =3D dv/max(abs(vmin), abs(vmax)) ZeroDivisionError: float division |