@@ -240,8 +240,8 @@ def resize(self, event):
240
240
241
241
self ._tkcanvas .delete (self ._tkphoto )
242
242
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 )
245
245
self .resize_event ()
246
246
self .show ()
247
247
@@ -555,7 +555,7 @@ def __init__(self, canvas, window):
555
555
xmin , xmax = canvas .figure .bbox .intervalx
556
556
height , width = 50 , xmax - xmin
557
557
Tk .Frame .__init__ (self , master = self .window ,
558
- width = width , height = height ,
558
+ width = int ( width ) , height = int ( height ) ,
559
559
borderwidth = 2 )
560
560
561
561
self .update () # Make axes menu
@@ -711,7 +711,7 @@ def _init_toolbar(self):
711
711
xmin , xmax = self .canvas .figure .bbox .intervalx
712
712
height , width = 50 , xmax - xmin
713
713
Tk .Frame .__init__ (self , master = self .window ,
714
- width = width , height = height ,
714
+ width = int ( width ) , height = int ( height ) ,
715
715
borderwidth = 2 )
716
716
717
717
self .update () # Make axes menu
0 commit comments