Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Deprecate never used resize_callback param to FigureCanvasTk. #19019

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 1 commit into from
Nov 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions doc/api/next_api_changes/deprecations/19019-AL.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*resize_callback* parameter to ``FigureCanvasTk``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This parameter was never used internally and is deprecated. Tk-level custom
event handlers for resize events can be added to a ``FigureCanvasTk`` using
e.g. ``get_tk_widget().bind('<Configure>', ..., True)``.
3 changes: 3 additions & 0 deletions lib/matplotlib/backends/_backend_tk.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ def _on_timer(self):
class FigureCanvasTk(FigureCanvasBase):
required_interactive_framework = "tk"

@cbook._delete_parameter(
"3.4", "resize_callback",
alternative="get_tk_widget().bind('<Configure>', ..., True)")
def __init__(self, figure, master=None, resize_callback=None):
super().__init__(figure)
self._idle = True
Expand Down