@@ -95,11 +95,11 @@ def __init__(self, fig, rect=None, *args, **kwargs):
95
95
self ._shared_z_axes .join (self , sharez )
96
96
self ._adjustable = 'datalim'
97
97
98
- Axes . __init__ ( self , fig , rect ,
99
- frameon = True ,
100
- * args , ** kwargs )
98
+ super ( Axes3D , self ). __init__ ( fig , rect ,
99
+ frameon = True ,
100
+ * args , ** kwargs )
101
101
# Disable drawing of axes by base class
102
- Axes .set_axis_off (self )
102
+ super ( Axes3D , self ) .set_axis_off ()
103
103
# Enable drawing of axes by Axes3D class
104
104
self .set_axis_on ()
105
105
self .M = None
@@ -159,7 +159,8 @@ def _process_unit_info(self, xdata=None, ydata=None, zdata=None,
159
159
Look for unit *kwargs* and update the axis instances as necessary
160
160
161
161
"""
162
- Axes ._process_unit_info (self , xdata = xdata , ydata = ydata , kwargs = kwargs )
162
+ super (Axes3D , self )._process_unit_info (xdata = xdata , ydata = ydata ,
163
+ kwargs = kwargs )
163
164
164
165
if self .xaxis is None or self .yaxis is None or self .zaxis is None :
165
166
return
@@ -189,8 +190,8 @@ def set_top_view(self):
189
190
190
191
# This is purposely using the 2D Axes's set_xlim and set_ylim,
191
192
# because we are trying to place our viewing pane.
192
- Axes . set_xlim ( self , - xdwl , xdw , auto = None )
193
- Axes . set_ylim ( self , - ydwl , ydw , auto = None )
193
+ super ( Axes3D , self ). set_xlim ( - xdwl , xdw , auto = None )
194
+ super ( Axes3D , self ). set_ylim ( - ydwl , ydw , auto = None )
194
195
195
196
def _init_axis (self ):
196
197
'''Init 3D axes; overrides creation of regular X/Y axes'''
@@ -208,7 +209,7 @@ def _init_axis(self):
208
209
ax .init3d ()
209
210
210
211
def get_children (self ):
211
- return [self .zaxis , ] + Axes .get_children (self )
212
+ return [self .zaxis , ] + super ( Axes3D , self ) .get_children ()
212
213
213
214
def _get_axis_list (self ):
214
215
return super (Axes3D , self )._get_axis_list () + (self .zaxis , )
@@ -293,7 +294,7 @@ def draw(self, renderer):
293
294
ax .draw (renderer )
294
295
295
296
# Then rest
296
- Axes . draw ( self , renderer )
297
+ super ( Axes3D , self ). draw ( renderer )
297
298
298
299
def get_axis_position (self ):
299
300
vals = self .get_w_lims ()
@@ -313,7 +314,7 @@ def get_autoscale_on(self):
313
314
.. versionadded :: 1.1.0
314
315
This function was added, but not tested. Please report any bugs.
315
316
"""
316
- return Axes .get_autoscale_on (self ) and self .get_autoscalez_on ()
317
+ return super ( Axes3D , self ) .get_autoscale_on () and self .get_autoscalez_on ()
317
318
318
319
def get_autoscalez_on (self ):
319
320
"""
@@ -333,7 +334,7 @@ def set_autoscale_on(self, b):
333
334
.. versionadded :: 1.1.0
334
335
This function was added, but not tested. Please report any bugs.
335
336
"""
336
- Axes . set_autoscale_on ( self , b )
337
+ super ( Axes3D , self ). set_autoscale_on ( b )
337
338
self .set_autoscalez_on (b )
338
339
339
340
def set_autoscalez_on (self , b ):
@@ -1076,7 +1077,7 @@ def cla(self):
1076
1077
# Disabling mouse interaction might have been needed a long
1077
1078
# time ago, but I can't find a reason for it now - BVR (2012-03)
1078
1079
#self.disable_mouse_rotation()
1079
- Axes .cla (self )
1080
+ super ( Axes3D , self ) .cla ()
1080
1081
self .zaxis .cla ()
1081
1082
1082
1083
if self ._sharez is not None :
@@ -1095,7 +1096,6 @@ def cla(self):
1095
1096
self ._autoscaleZon = True
1096
1097
self ._zmargin = 0
1097
1098
1098
-
1099
1099
self .grid (rcParams ['axes3d.grid' ])
1100
1100
1101
1101
def disable_mouse_rotation (self ):
@@ -1415,7 +1415,7 @@ def tick_params(self, axis='both', **kwargs):
1415
1415
.. versionadded :: 1.1.0
1416
1416
This function was added, but not tested. Please report any bugs.
1417
1417
"""
1418
- Axes . tick_params ( self , axis , ** kwargs )
1418
+ super ( Axes3D , self ). tick_params ( axis , ** kwargs )
1419
1419
if axis in ['z' , 'both' ] :
1420
1420
zkw = dict (kwargs )
1421
1421
zkw .pop ('top' , None )
@@ -1495,7 +1495,7 @@ def text(self, x, y, z, s, zdir=None, **kwargs):
1495
1495
except for the `zdir` keyword, which sets the direction to be
1496
1496
used as the z direction.
1497
1497
'''
1498
- text = Axes . text ( self , x , y , s , ** kwargs )
1498
+ text = super ( Axes3D , self ). text ( x , y , s , ** kwargs )
1499
1499
art3d .text_2d_to_3d (text , z , zdir )
1500
1500
return text
1501
1501
@@ -1538,7 +1538,7 @@ def plot(self, xs, ys, *args, **kwargs):
1538
1538
if not cbook .iterable (zs ):
1539
1539
zs = np .ones (len (xs )) * zs
1540
1540
1541
- lines = Axes . plot ( self , xs , ys , * args , ** kwargs )
1541
+ lines = super ( Axes3D , self ). plot ( xs , ys , * args , ** kwargs )
1542
1542
for line in lines :
1543
1543
art3d .line_2d_to_3d (line , zs = zs , zdir = zdir )
1544
1544
@@ -2107,7 +2107,7 @@ def contour(self, X, Y, Z, *args, **kwargs):
2107
2107
had_data = self .has_data ()
2108
2108
2109
2109
jX , jY , jZ = art3d .rotate_axes (X , Y , Z , zdir )
2110
- cset = Axes . contour ( self , jX , jY , jZ , * args , ** kwargs )
2110
+ cset = super ( Axes3D , self ). contour ( jX , jY , jZ , * args , ** kwargs )
2111
2111
self .add_contour_set (cset , extend3d , stride , zdir , offset )
2112
2112
2113
2113
self .auto_scale_xyz (X , Y , Z , had_data )
@@ -2164,7 +2164,7 @@ def tricontour(self, *args, **kwargs):
2164
2164
jX , jY , jZ = art3d .rotate_axes (X , Y , Z , zdir )
2165
2165
tri = Triangulation (jX , jY , tri .triangles , tri .mask )
2166
2166
2167
- cset = Axes . tricontour ( self , tri , jZ , * args , ** kwargs )
2167
+ cset = super ( Axes3D , self ). tricontour ( tri , jZ , * args , ** kwargs )
2168
2168
self .add_contour_set (cset , extend3d , stride , zdir , offset )
2169
2169
2170
2170
self .auto_scale_xyz (X , Y , Z , had_data )
@@ -2199,7 +2199,7 @@ def contourf(self, X, Y, Z, *args, **kwargs):
2199
2199
had_data = self .has_data ()
2200
2200
2201
2201
jX , jY , jZ = art3d .rotate_axes (X , Y , Z , zdir )
2202
- cset = Axes . contourf ( self , jX , jY , jZ , * args , ** kwargs )
2202
+ cset = super ( Axes3D , self ). contourf ( jX , jY , jZ , * args , ** kwargs )
2203
2203
self .add_contourf_set (cset , zdir , offset )
2204
2204
2205
2205
self .auto_scale_xyz (X , Y , Z , had_data )
@@ -2251,7 +2251,7 @@ def tricontourf(self, *args, **kwargs):
2251
2251
jX , jY , jZ = art3d .rotate_axes (X , Y , Z , zdir )
2252
2252
tri = Triangulation (jX , jY , tri .triangles , tri .mask )
2253
2253
2254
- cset = Axes . tricontourf ( self , tri , jZ , * args , ** kwargs )
2254
+ cset = super ( Axes3D , self ). tricontourf ( tri , jZ , * args , ** kwargs )
2255
2255
self .add_contourf_set (cset , zdir , offset )
2256
2256
2257
2257
self .auto_scale_xyz (X , Y , Z , had_data )
@@ -2288,7 +2288,7 @@ def add_collection3d(self, col, zs=0, zdir='z'):
2288
2288
art3d .patch_collection_2d_to_3d (col , zs = zs , zdir = zdir )
2289
2289
col .set_sort_zpos (zsortval )
2290
2290
2291
- Axes . add_collection ( self , col )
2291
+ super ( Axes3D , self ). add_collection ( col )
2292
2292
2293
2293
def scatter (self , xs , ys , zs = 0 , zdir = 'z' , s = 20 , c = None , depthshade = True ,
2294
2294
* args , ** kwargs ):
@@ -2347,7 +2347,8 @@ def scatter(self, xs, ys, zs=0, zdir='z', s=20, c=None, depthshade=True,
2347
2347
2348
2348
xs , ys , zs , s , c = cbook .delete_masked_points (xs , ys , zs , s , c )
2349
2349
2350
- patches = Axes .scatter (self , xs , ys , s = s , c = c , * args , ** kwargs )
2350
+ patches = super (Axes3D , self ).scatter (xs , ys , s = s , c = c , * args ,
2351
+ ** kwargs )
2351
2352
if not cbook .iterable (zs ):
2352
2353
is_2d = True
2353
2354
zs = np .ones (len (xs )) * zs
@@ -2389,7 +2390,7 @@ def bar(self, left, height, zs=0, zdir='z', *args, **kwargs):
2389
2390
2390
2391
had_data = self .has_data ()
2391
2392
2392
- patches = Axes . bar ( self , left , height , * args , ** kwargs )
2393
+ patches = super ( Axes3D , self ). bar ( left , height , * args , ** kwargs )
2393
2394
2394
2395
if not cbook .iterable (zs ):
2395
2396
zs = np .ones (len (left )) * zs
@@ -2564,7 +2565,8 @@ def bar3d(self, x, y, z, dx, dy, dz, color=None,
2564
2565
return col
2565
2566
2566
2567
def set_title (self , label , fontdict = None , loc = 'center' , ** kwargs ):
2567
- ret = Axes .set_title (self , label , fontdict = fontdict , loc = loc , ** kwargs )
2568
+ ret = super (Axes3D , self ).set_title (label , fontdict = fontdict , loc = loc ,
2569
+ ** kwargs )
2568
2570
(x , y ) = self .title .get_position ()
2569
2571
self .title .set_y (0.92 * y )
2570
2572
return ret
0 commit comments