@@ -3252,10 +3252,6 @@ def __init__(self, manager):
3252
3252
self ._idDrag = self .canvas .mpl_connect (
3253
3253
'motion_notify_event' , self ._mouse_move )
3254
3254
3255
- # a dict from axes index to a list of view limits
3256
- self .views = cbook .Stack ()
3257
- self .positions = cbook .Stack () # stack of subplot positions
3258
-
3259
3255
self ._tools = {}
3260
3256
self ._keys = {}
3261
3257
self ._instances = {}
@@ -3522,12 +3518,6 @@ def get_tools(self):
3522
3518
'keymap' : keys }
3523
3519
return d
3524
3520
3525
- def update (self ):
3526
- """Reset the axes stack"""
3527
-
3528
- self .views .clear ()
3529
- self .positions .clear ()
3530
-
3531
3521
def _mouse_move (self , event ):
3532
3522
if not event .inaxes or not self ._toggled :
3533
3523
if self ._last_cursor != self ._default_cursor :
@@ -3557,28 +3547,6 @@ def _mouse_move(self, event):
3557
3547
else :
3558
3548
self .toolbar .set_message ('' )
3559
3549
3560
- def draw (self ):
3561
- """Redraw the canvases, update the locators"""
3562
-
3563
- for a in self .canvas .figure .get_axes ():
3564
- xaxis = getattr (a , 'xaxis' , None )
3565
- yaxis = getattr (a , 'yaxis' , None )
3566
- zaxis = getattr (a , 'zaxis' , None )
3567
- locators = []
3568
- if xaxis is not None :
3569
- locators .append (xaxis .get_major_locator ())
3570
- locators .append (xaxis .get_minor_locator ())
3571
- if yaxis is not None :
3572
- locators .append (yaxis .get_major_locator ())
3573
- locators .append (yaxis .get_minor_locator ())
3574
- if zaxis is not None :
3575
- locators .append (zaxis .get_major_locator ())
3576
- locators .append (zaxis .get_minor_locator ())
3577
-
3578
- for loc in locators :
3579
- loc .refresh ()
3580
- self .canvas .draw_idle ()
3581
-
3582
3550
def set_cursor (self , cursor ):
3583
3551
"""
3584
3552
Set the current cursor to one of the :class:`Cursors`
@@ -3587,43 +3555,6 @@ def set_cursor(self, cursor):
3587
3555
3588
3556
pass
3589
3557
3590
- def update_view (self ):
3591
- """Update the viewlim and position from the view and
3592
- position stack for each axes
3593
- """
3594
-
3595
- lims = self .views ()
3596
- if lims is None :
3597
- return
3598
- pos = self .positions ()
3599
- if pos is None :
3600
- return
3601
- for i , a in enumerate (self .canvas .figure .get_axes ()):
3602
- xmin , xmax , ymin , ymax = lims [i ]
3603
- a .set_xlim ((xmin , xmax ))
3604
- a .set_ylim ((ymin , ymax ))
3605
- # Restore both the original and modified positions
3606
- a .set_position (pos [i ][0 ], 'original' )
3607
- a .set_position (pos [i ][1 ], 'active' )
3608
-
3609
- self .canvas .draw_idle ()
3610
-
3611
- def push_current (self ):
3612
- """push the current view limits and position onto the stack"""
3613
-
3614
- lims = []
3615
- pos = []
3616
- for a in self .canvas .figure .get_axes ():
3617
- xmin , xmax = a .get_xlim ()
3618
- ymin , ymax = a .get_ylim ()
3619
- lims .append ((xmin , xmax , ymin , ymax ))
3620
- # Store both the original and modified positions
3621
- pos .append ((
3622
- a .get_position (True ).frozen (),
3623
- a .get_position ().frozen ()))
3624
- self .views .push (lims )
3625
- self .positions .push (pos )
3626
-
3627
3558
def draw_rubberband (self , event , caller , x0 , y0 , x1 , y1 ):
3628
3559
"""Draw a rectangle rubberband to indicate zoom limits
3629
3560
0 commit comments