The following code fails with a math range error:
from pylab import *
plot(arange(5), 'ro')
xscale('symlog')
The traceback indicates that the ticker is attempting to treat vmin
(which falls inside the "linear" portion of the SymLog scale) as a log
value, which obviously fails when vmin=0. If vmin is less than zero,
then everything works fine. For example the following works.
from pylab import *
plot(arange(-1,5) ,'ro')
xscale('symlog')
Traceback for the first example is as follows:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "c:\progra~1\python25\lib\site-packages\matplotlib-0.98.1-py2.5-win32.egg
\matplotlib\pyplot.py", line 824, in xscale
ret = ax.set_xscale(*args, **kwargs)
File "c:\progra~1\python25\lib\site-packages\matplotlib-0.98.1-py2.5-win32.egg
\matplotlib\axes.py", line 1773, in set_xscale
self.autoscale_view()
File "c:\progra~1\python25\lib\site-packages\matplotlib-0.98.1-py2.5-win32.egg
\matplotlib\axes.py", line 1400, in autoscale_view
XL = self.xaxis.get_major_locator().autoscale()
File "c:\programs\Python25\lib\site-packages\matplotlib-0.98.1-py2.5-win32.egg
\matplotlib\ticker.py", line 1114, in autoscale
if not is_decade(abs(vmin), b):
File "c:\programs\Python25\lib\site-packages\matplotlib-0.98.1-py2.5-win32.egg
\matplotlib\ticker.py", line 960, in is_decade
lx = math.log(x)/math.log(base)
OverflowError: math range error
Orest
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users