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

Skip to content

Commit b344ab8

Browse files
author
Stephen Horst
committed
Attempting to resize when toolbar has been turned off causes an unhandled exception
1 parent ba68e6f commit b344ab8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

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)