Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

MNT: Deprecate figure callbacks#22813

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
anntzer merged 1 commit intomatplotlib:mainfromgreglucas:rm-dpi-changed
Apr 17, 2022

Conversation

greglucas
Copy link
Contributor

PR Summary

This removes callbacks from the figure level. It only allowed the "dpi_changed" signal, which is not used anywhere in the library anymore after#22807

A quick note thatresize_event is apparently not always emitted on a dpi change, but forcing it withself.canvas.resize_event() triggers some other test failures, so I'm not sure we want to send that signal within the dpi change routine either. I think this is more of a messaging thing in what do we want to list as an alternative rather than a show-stopper and needing to keep this signal around.

PR Checklist

Tests and Styling

  • [N/A] Has pytest style unit tests (andpytest passes).
  • [N/A] IsFlake 8 compliant (installflake8-docstrings and runflake8 --docstring-convention=all).

Documentation

  • [N/A] New features are documented, with examples if plot related.
  • [N/A] New features have an entry indoc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented indoc/api/next_api_changes/ (follow instructions in README.rst there).
  • [N/A] Documentation is sphinx and numpydoc compliant (the docs shouldbuild without error).

@greglucasgreglucas added this to thev3.6.0 milestoneApr 9, 2022
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The figure callbacks property is deprecated. The only signal was
"dpi_changed", which can be replaced by connecting to the "resize_event"
on ``figure.canvas.callbacks`` instead.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Should this point tocanvas.mpl_connect instead?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Sure, I updated the doc.canvas.mpl_connect is simply an alias forcanvas.callbacks.connect it looks like. I guessmpl_connect is preferred?

This removes callbacks from the figure level. It only allowed thedpi_changed signal, which is not used anywhere in the library.
@anntzeranntzer merged commit16f6370 intomatplotlib:mainApr 17, 2022
@greglucasgreglucas deleted the rm-dpi-changed branchApril 18, 2022 01:53
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@tacaswelltacaswelltacaswell left review comments

@anntzeranntzeranntzer approved these changes

@jklymakjklymakjklymak approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
v3.6.0
Development

Successfully merging this pull request may close these issues.

4 participants
@greglucas@tacaswell@anntzer@jklymak

[8]ページ先頭

©2009-2025 Movatter.jp