FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Remove print_figure overrides in backend subclasses by QuLogic · Pull Request #25713 · matplotlib/matplotlib · GitHub

Repository navigation

Remove print_figure overrides in backend subclasses - #25713

Merged
tacaswell merged 1 commit into
matplotlib:mainfrom
QuLogic:no-backend-print_figure
Apr 19, 2023
Merged

tacaswell merged 1 commit into
matplotlib:mainfrom
QuLogic:no-backend-print_figure

Conversation

QuLogic commented Apr 18, 2023

Copy link
Copy Markdown
Member

PR Summary

AFAICT, print_figure is only called in savefig, and thus has no relation to backend drawing. We went through a lot of trouble to make savefig self-contained, so if this really had any effect, it would be a bug in it instead. But other backends don't do this override and seem to work fine, so these seem superfluous as well.

After this change, just opening a window in Qt and using the save button did not seem to break anything, nor did running savefig with an interactive window open. I did not test Wx, but given the callers of print_figure, I don't see how it could be different.

Fixes #5234

PR Checklist

Documentation and Tests

  • [n/a] Has pytest style unit tests (and pytest passes)
  • [n/a] Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • [n/a] New plotting related features are documented with examples.

Release Notes

  • [n/a] New features are marked with a .. versionadded:: directive in the docstring and documented in doc/users/next_whats_new/
  • [n/a] API changes are marked with a .. versionchanged:: directive in the docstring and documented in doc/api/next_api_changes/
  • [n/a] Release notes conform with instructions in next_whats_new/README.rst or next_api_changes/README.rst

AFAICT, `print_figure` is only called in `savefig`, and thus has no
relation to backend drawing. We went through a lot of trouble to make
`savefig` self-contained, so if this really had any effect, it would be
a bug in it instead. But other backends don't do this override and seem
to work fine, so these seem superfluous as well.

After this change, just opening a window in Qt and using the save button
did not seem to break anything, nor did running `savefig` with an
interactive window open. I did not test Wx, but given the callers of
`print_figure`, I don't see how it could be different.

Fixes matplotlib#5234
QuLogic added this to the v3.8.0 milestone Apr 18, 2023

Copy link
Copy Markdown
Member

Other option would be to change these to draw_idle, but agree that if this is needed here that is a bug better fixed else where.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unicode with usetex=True and pgf backend

3 participants


Back | FazBrowse Home | New Git URL