@@ -166,7 +166,7 @@ def __init__(self, ax, label, image=None,
166
166
hovercolor : color
167
167
The color of the button when the mouse is over it.
168
168
"""
169
- AxesWidget .__init__ (self , ax )
169
+ super () .__init__ (ax )
170
170
171
171
if image is not None :
172
172
ax .imshow (image )
@@ -308,7 +308,7 @@ def __init__(self, ax, label, valmin, valmax, valinit=0.5, valfmt=None,
308
308
if ax .name == '3d' :
309
309
raise ValueError ('Sliders cannot be added to 3D Axes' )
310
310
311
- AxesWidget .__init__ (self , ax )
311
+ super () .__init__ (ax )
312
312
313
313
if slidermin is not None and not hasattr (slidermin , 'val' ):
314
314
raise ValueError ("Argument slidermin ({}) has no 'val'"
@@ -552,7 +552,7 @@ def __init__(self, ax, labels, actives=None):
552
552
The initial check states of the buttons. The list must have the
553
553
same length as *labels*. If not given, all buttons are unchecked.
554
554
"""
555
- AxesWidget .__init__ (self , ax )
555
+ super () .__init__ (ax )
556
556
557
557
ax .set_xticks ([])
558
558
ax .set_yticks ([])
@@ -715,7 +715,7 @@ def __init__(self, ax, label, initial='',
715
715
label_pad : float
716
716
The distance between the label and the right side of the textbox.
717
717
"""
718
- AxesWidget .__init__ (self , ax )
718
+ super () .__init__ (ax )
719
719
720
720
self .DIST_FROM_LEFT = .05
721
721
@@ -983,7 +983,7 @@ def __init__(self, ax, labels, active=0, activecolor='blue'):
983
983
activecolor : color
984
984
The color of the selected button.
985
985
"""
986
- AxesWidget .__init__ (self , ax )
986
+ super () .__init__ (ax )
987
987
self .activecolor = activecolor
988
988
self .value_selected = None
989
989
@@ -1236,7 +1236,7 @@ class Cursor(AxesWidget):
1236
1236
1237
1237
def __init__ (self , ax , horizOn = True , vertOn = True , useblit = False ,
1238
1238
** lineprops ):
1239
- AxesWidget .__init__ (self , ax )
1239
+ super () .__init__ (ax )
1240
1240
1241
1241
self .connect_event ('motion_notify_event' , self .onmove )
1242
1242
self .connect_event ('draw_event' , self .clear )
@@ -1418,7 +1418,7 @@ class _SelectorWidget(AxesWidget):
1418
1418
1419
1419
def __init__ (self , ax , onselect , useblit = False , button = None ,
1420
1420
state_modifier_keys = None ):
1421
- AxesWidget .__init__ (self , ax )
1421
+ super () .__init__ (ax )
1422
1422
1423
1423
self .visible = True
1424
1424
self .onselect = onselect
@@ -1445,7 +1445,7 @@ def __init__(self, ax, onselect, useblit=False, button=None,
1445
1445
self .state = set ()
1446
1446
1447
1447
def set_active (self , active ):
1448
- AxesWidget .set_active (self , active )
1448
+ super () .set_active (active )
1449
1449
if active :
1450
1450
self .update_background (None )
1451
1451
@@ -1676,8 +1676,7 @@ def __init__(self, ax, onselect, direction, minspan=None, useblit=False,
1676
1676
rectprops = None , onmove_callback = None , span_stays = False ,
1677
1677
button = None ):
1678
1678
1679
- _SelectorWidget .__init__ (self , ax , onselect , useblit = useblit ,
1680
- button = button )
1679
+ super ().__init__ (ax , onselect , useblit = useblit , button = button )
1681
1680
1682
1681
if rectprops is None :
1683
1682
rectprops = dict (facecolor = 'red' , alpha = 0.5 )
@@ -1737,7 +1736,7 @@ def new_axes(self, ax):
1737
1736
1738
1737
def ignore (self , event ):
1739
1738
# docstring inherited
1740
- return _SelectorWidget .ignore (self , event ) or not self .visible
1739
+ return super () .ignore (event ) or not self .visible
1741
1740
1742
1741
def _press (self , event ):
1743
1742
"""on button press event"""
@@ -1980,9 +1979,8 @@ def onselect(eclick: MouseEvent, erelease: MouseEvent)
1980
1979
1981
1980
"square" and "center" can be combined.
1982
1981
"""
1983
- _SelectorWidget .__init__ (self , ax , onselect , useblit = useblit ,
1984
- button = button ,
1985
- state_modifier_keys = state_modifier_keys )
1982
+ super ().__init__ (ax , onselect , useblit = useblit , button = button ,
1983
+ state_modifier_keys = state_modifier_keys )
1986
1984
1987
1985
self .to_draw = None
1988
1986
self .visible = True
@@ -2401,8 +2399,7 @@ def onselect(verts):
2401
2399
2402
2400
def __init__ (self , ax , onselect = None , useblit = True , lineprops = None ,
2403
2401
button = None ):
2404
- _SelectorWidget .__init__ (self , ax , onselect , useblit = useblit ,
2405
- button = button )
2402
+ super ().__init__ (ax , onselect , useblit = useblit , button = button )
2406
2403
self .verts = None
2407
2404
if lineprops is None :
2408
2405
lineprops = dict ()
@@ -2488,8 +2485,8 @@ def __init__(self, ax, onselect, useblit=False,
2488
2485
move_all = 'shift' , move = 'not-applicable' ,
2489
2486
square = 'not-applicable' ,
2490
2487
center = 'not-applicable' )
2491
- _SelectorWidget .__init__ (self , ax , onselect , useblit = useblit ,
2492
- state_modifier_keys = state_modifier_keys )
2488
+ super () .__init__ (ax , onselect , useblit = useblit ,
2489
+ state_modifier_keys = state_modifier_keys )
2493
2490
2494
2491
self ._xs , self ._ys = [0 ], [0 ]
2495
2492
self ._polygon_completed = False
@@ -2666,7 +2663,7 @@ class Lasso(AxesWidget):
2666
2663
"""
2667
2664
2668
2665
def __init__ (self , ax , xy , callback = None , useblit = True ):
2669
- AxesWidget .__init__ (self , ax )
2666
+ super () .__init__ (ax )
2670
2667
2671
2668
self .useblit = useblit and self .canvas .supports_blit
2672
2669
if self .useblit :
0 commit comments