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

Skip to content

Commit 4ed6cf3

Browse files
committed
Merge pull request matplotlib#4048 from sjhorst:v1.4.x
BUG : fix tk resizing with toolbar
2 parents ba68e6f + b344ab8 commit 4ed6cf3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/backends/backend_tkagg.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,8 @@ def resize(self, width, height=None):
562562
else:
563563
self.canvas._tkcanvas.master.geometry("%dx%d" % (width, height))
564564

565-
self.toolbar.configure(width=width)
565+
if self.toolbar is not None:
566+
self.toolbar.configure(width=width)
566567

567568
def show(self):
568569
"""

0 commit comments

Comments
 (0)