-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Description
Present in 1.5.1 and on 2.0.0b3, as well as master I think.
Enabling minor ticks via minorticks_on
and having scale set to symlog raises an exception. In minorticks_on
, the input passed to SymmetricalLogLocator is base and subs, but SymmetricalLogLocator is expecting transform and subs. Calling self._transform.base, when self._transform is a base (a float) causes exception,
...
File "C:\Python27_numpy\lib\site-packages\matplotlib\axis.py", line 900, in iter_ticks
minorLocs = self.minor.locator()
File "C:\Python27_numpy\lib\site-packages\matplotlib\ticker.py", line 1662, in call
return self.tick_values(vmin, vmax)
File "C:\Python27_numpy\lib\site-packages\matplotlib\ticker.py", line 1665, in tick_values
b = self._transform.base
AttributeError: 'float' object has no attribute 'base'
Minimum code to reproduce,
import matplotlib.pyplot as plt
plt.plot([1,2,3,4])
ax = plt.gca()
ax.set_xscale('symlog')
ax.set_yscale('symlog')
ax.minorticks_on()
plt.show()