Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

set_tick_params(label1On=False) should also make offset text invisible. #16896

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

Merged

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Mar 24, 2020

PR Summary

See changelog.
Closes #16895, which is likely a better example than anything I could write :-)
(The issue refers to mpl_toolkits, but it's actually present in standard mpl as well.)

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 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

@anntzer anntzer added this to the v3.3.0 milestone Mar 24, 2020
@ImportanceOfBeingErnest
Copy link
Member

Careful. This would remove the offset in case the right or top axis is used for ticking. E.g.

import matplotlib.pyplot as plt
fig, ax = plt.subplots()
ax.plot([1, 1e8])
ax.yaxis.tick_right()
plt.show()

would result in the offset missing.

@anntzer anntzer force-pushed the offset-text-follows-tick-label-visibility branch from 1ffcd05 to a382579 Compare March 24, 2020 22:45
@anntzer
Copy link
Contributor Author

anntzer commented Mar 24, 2020

fair enough, I decided to be a bit more generous and keep the offset text visible if either the left or the right labels are visible.

@QuLogic
Copy link
Member

QuLogic commented Mar 25, 2020

Add a test for the new case?

@anntzer anntzer force-pushed the offset-text-follows-tick-label-visibility branch from a382579 to 1986da3 Compare March 25, 2020 23:55
@anntzer
Copy link
Contributor Author

anntzer commented Mar 25, 2020

sure, done

@QuLogic QuLogic merged commit ad76c83 into matplotlib:master Mar 26, 2020
@anntzer anntzer deleted the offset-text-follows-tick-label-visibility branch March 26, 2020 08:46
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.

offset text still visible with ImageGrid axis "L"
4 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.