@@ -230,8 +230,8 @@ def resize(self, event):
230230
231231 self ._tkcanvas .delete (self ._tkphoto )
232232 self ._tkphoto = Tk .PhotoImage (
233- master = self ._tkcanvas , width = width , height = height )
234- self ._tkcanvas .create_image (width / 2 , height / 2 ,image = self ._tkphoto )
233+ master = self ._tkcanvas , width = int ( width ) , height = int ( height ) )
234+ self ._tkcanvas .create_image (int ( width / 2 ), int ( height / 2 ) ,image = self ._tkphoto )
235235 self .resize_event ()
236236 self .show ()
237237
@@ -545,7 +545,7 @@ def __init__(self, canvas, window):
545545 xmin , xmax = canvas .figure .bbox .intervalx
546546 height , width = 50 , xmax - xmin
547547 Tk .Frame .__init__ (self , master = self .window ,
548- width = width , height = height ,
548+ width = int ( width ) , height = int ( height ) ,
549549 borderwidth = 2 )
550550
551551 self .update () # Make axes menu
@@ -701,7 +701,7 @@ def _init_toolbar(self):
701701 xmin , xmax = self .canvas .figure .bbox .intervalx
702702 height , width = 50 , xmax - xmin
703703 Tk .Frame .__init__ (self , master = self .window ,
704- width = width , height = height ,
704+ width = int ( width ) , height = int ( height ) ,
705705 borderwidth = 2 )
706706
707707 self .update () # Make axes menu
0 commit comments