@@ -240,8 +240,8 @@ def resize(self, event):
240240
241241 self ._tkcanvas .delete (self ._tkphoto )
242242 self ._tkphoto = Tk .PhotoImage (
243- master = self ._tkcanvas , width = width , height = height )
244- self ._tkcanvas .create_image (width / 2 , height / 2 ,image = self ._tkphoto )
243+ master = self ._tkcanvas , width = int ( width ) , height = int ( height ) )
244+ self ._tkcanvas .create_image (int ( width / 2 ), int ( height / 2 ) ,image = self ._tkphoto )
245245 self .resize_event ()
246246 self .show ()
247247
@@ -555,7 +555,7 @@ def __init__(self, canvas, window):
555555 xmin , xmax = canvas .figure .bbox .intervalx
556556 height , width = 50 , xmax - xmin
557557 Tk .Frame .__init__ (self , master = self .window ,
558- width = width , height = height ,
558+ width = int ( width ) , height = int ( height ) ,
559559 borderwidth = 2 )
560560
561561 self .update () # Make axes menu
@@ -711,7 +711,7 @@ def _init_toolbar(self):
711711 xmin , xmax = self .canvas .figure .bbox .intervalx
712712 height , width = 50 , xmax - xmin
713713 Tk .Frame .__init__ (self , master = self .window ,
714- width = width , height = height ,
714+ width = int ( width ) , height = int ( height ) ,
715715 borderwidth = 2 )
716716
717717 self .update () # Make axes menu
0 commit comments