Skip to content

symlog + minor ticks = exception #6967

@LevN0

Description

@LevN0

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()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy