@@ -457,7 +457,7 @@ def __init__(self, canvas, num, window):
457457 self .window .wm_title ("Figure %d" % num )
458458 self .canvas = canvas
459459 self ._num = num
460- t1 , t2 , w , h = canvas .figure .bbox .bounds
460+ _ , _ , w , h = canvas .figure .bbox .bounds
461461 w , h = int (w ), int (h )
462462 self .window .minsize (int (w * 3 / 4 ),int (h * 3 / 4 ))
463463 if matplotlib .rcParams ['toolbar' ]== 'classic' :
@@ -476,12 +476,9 @@ def notify_axes_change(fig):
476476 if self .toolbar != None : self .toolbar .update ()
477477 self .canvas .figure .add_axobserver (notify_axes_change )
478478
479-
480-
481479 # attach a show method to the figure for pylab ease of use
482480 self .canvas .figure .show = lambda * args : self .show ()
483481
484-
485482 def resize (self , width , height = None ):
486483 # before 09-12-22, the resize method takes a single *event*
487484 # parameter. On the other hand, the resize method of other
@@ -499,7 +496,6 @@ def resize(self, width, height=None):
499496
500497 self .toolbar .configure (width = width )
501498
502-
503499 def show (self ):
504500 """
505501 this function doesn't segfault but causes the
@@ -518,7 +514,6 @@ def destroy(*args):
518514 self .canvas .draw_idle ()
519515 self ._shown = True
520516
521-
522517 def destroy (self , * args ):
523518 if self .window is not None :
524519 #self.toolbar.destroy()
@@ -533,6 +528,12 @@ def destroy(self, *args):
533528 def set_window_title (self , title ):
534529 self .window .wm_title (title )
535530
531+ def full_screen_toggle (self ):
532+ # cross platform way of maximizing a tk window
533+ # http://devourer09.blogspot.co.uk/2009/07/maximizing-tkinter-app.html
534+ self .window .attributes ('-zoomed' , '1' )
535+
536+
536537class AxisMenu :
537538 def __init__ (self , master , naxes ):
538539 self ._master = master
@@ -597,7 +598,7 @@ def select_all(self):
597598
598599class NavigationToolbar (Tk .Frame ):
599600 """
600- Public attriubutes
601+ Public attributes
601602
602603 canvas - the FigureCanvas (gtk.DrawingArea)
603604 win - the gtk.Window
@@ -722,7 +723,7 @@ def update(self):
722723
723724class NavigationToolbar2TkAgg (NavigationToolbar2 , Tk .Frame ):
724725 """
725- Public attriubutes
726+ Public attributes
726727
727728 canvas - the FigureCanvas (gtk.DrawingArea)
728729 win - the gtk.Window
0 commit comments