From 89bcf96ab83aa6bd3095abdb6b175bdbdbf3ae3a Mon Sep 17 00:00:00 2001 From: David Stansby Date: Fri, 27 Mar 2020 11:10:12 +0000 Subject: [PATCH] Backport PR #16929: tk: Resize the canvas, not the figure. --- lib/matplotlib/backends/_backend_tk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/backends/_backend_tk.py b/lib/matplotlib/backends/_backend_tk.py index b334fb71a763..80bfa80bc537 100644 --- a/lib/matplotlib/backends/_backend_tk.py +++ b/lib/matplotlib/backends/_backend_tk.py @@ -460,7 +460,7 @@ def _get_toolmanager(self): return toolmanager def resize(self, width, height): - self.canvas._tkcanvas.master.geometry("%dx%d" % (width, height)) + self.canvas._tkcanvas.configure(width=width, height=height) if self.toolbar is not None: self.toolbar.configure(width=width)