Skip to content

FIX: str method for SymmetricalLogTransform #11171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

jklymak
Copy link
Member

@jklymak jklymak commented May 4, 2018

PR Summary

Fixes recursion error for #11163

from matplotlib import pyplot as plt
import numpy as np

f, ax = plt.subplots()
ax.plot(np.arange(100))
ax.set_yscale('symlog')
print(ax.get_yaxis_transform())

I don't think this fix is really the correct fix. If a Transform doesn't have its str method defined, the default string method should not have a recursion. But this fixes the error.

Ping @anntzer who did some work on the transform repr recently...

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@jklymak jklymak force-pushed the FIX-str-for-SymmetricalLogTransform branch from 7a51f96 to adb4d87 Compare May 4, 2018 21:03
@jklymak
Copy link
Member Author

jklymak commented May 4, 2018

BTW, anyone feel free to override this PR with a proper fix to the fact that the default Transform str is the problem (um I think)...

@jklymak jklymak added this to the v2.2.3 milestone May 4, 2018
@jklymak
Copy link
Member Author

jklymak commented May 5, 2018

Closing in lieu of #11173 which is a more-holistic solution....

@jklymak jklymak closed this May 5, 2018
@jklymak jklymak deleted the FIX-str-for-SymmetricalLogTransform branch May 5, 2018 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant