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

Appearance settings

Commit 5960b5a

Browse filesBrowse files
authored
Merge pull request #19019 from anntzer/tkresize
Deprecate never used `resize_callback` param to FigureCanvasTk.
2 parents f1e0bb9 + f076d37 commit 5960b5a
Copy full SHA for 5960b5a

File tree

Expand file treeCollapse file tree

2 files changed

+8
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+8
-0
lines changed
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*resize_callback* parameter to ``FigureCanvasTk``
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
This parameter was never used internally and is deprecated. Tk-level custom
4+
event handlers for resize events can be added to a ``FigureCanvasTk`` using
5+
e.g. ``get_tk_widget().bind('<Configure>', ..., True)``.

‎lib/matplotlib/backends/_backend_tk.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/_backend_tk.py
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,9 @@ def _on_timer(self):
159159
class FigureCanvasTk(FigureCanvasBase):
160160
required_interactive_framework = "tk"
161161

162+
@cbook._delete_parameter(
163+
"3.4", "resize_callback",
164+
alternative="get_tk_widget().bind('<Configure>', ..., True)")
162165
def __init__(self, figure, master=None, resize_callback=None):
163166
super().__init__(figure)
164167
self._idle = True

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.