Skip to content

Use more _setattr_cm, thus fix Text('').get_window_extent(dpi=...) #16828

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
merged 2 commits into from
Mar 25, 2020

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Mar 19, 2020

PR Summary

This adds more _setattr_cm, and fixes a bug in Text.get_window_extent where if it contained an empty string, it would not reset the dpi of the figure.

PR Checklist

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

QuLogic added 2 commits March 24, 2020 22:32
This special case does not correctly reset the figure dpi, so the figure
randomly gets bigger when it's called. This does not affect Text with
actual content.
@anntzer anntzer added this to the v3.3.0 milestone Mar 25, 2020
@anntzer anntzer merged commit c080824 into matplotlib:master Mar 25, 2020
@QuLogic QuLogic deleted the setattr_cm branch March 25, 2020 19:32
@QuLogic
Copy link
Member Author

QuLogic commented Mar 25, 2020

The AppVeyor failure in test_determinism seems to be a real thing, occurring in a lot of new PRs, though strangely not on master builds. I'm not sure what causes it as I can't reproduce here (not on Windows).

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.

3 participants