Skip to content

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

Merged
anntzer merged 2 commits into
matplotlib:masterfrom
QuLogic:setattr_cm
Mar 25, 2020
Merged

anntzer merged 2 commits into
matplotlib:masterfrom
QuLogic:setattr_cm

Conversation

@QuLogic

@QuLogic QuLogic commented Mar 19, 2020

Copy link
Copy Markdown
Member

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

Comment thread lib/matplotlib/quiver.py Outdated
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

QuLogic commented Mar 25, 2020

Copy link
Copy Markdown
Member Author

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