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

Skip to content

Commit bde95b2

Browse files
authored
Merge pull request #16932 from meeseeksmachine/auto-backport-of-pr-16929-on-v3.2.x
Backport PR #16929 on branch v3.2.x (tk: Resize the canvas, not the figure.)
2 parents 2e92602 + 89bcf96 commit bde95b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/backends/_backend_tk.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ def _get_toolmanager(self):
460460
return toolmanager
461461

462462
def resize(self, width, height):
463-
self.canvas._tkcanvas.master.geometry("%dx%d" % (width, height))
463+
self.canvas._tkcanvas.configure(width=width, height=height)
464464

465465
if self.toolbar is not None:
466466
self.toolbar.configure(width=width)

0 commit comments

Comments
 (0)