@@ -488,7 +488,7 @@ def autoscale(self, enable=True, axis='both', tight=None):
488
488
else :
489
489
scalez = False
490
490
self .autoscale_view (tight = tight , scalex = scalex , scaley = scaley ,
491
- scalez = scalez )
491
+ scalez = scalez )
492
492
493
493
def auto_scale_xyz (self , X , Y , Z = None , had_data = None ):
494
494
# This updates the bounding boxes as to keep a record as to what the
@@ -505,7 +505,7 @@ def auto_scale_xyz(self, X, Y, Z=None, had_data=None):
505
505
self .autoscale_view ()
506
506
507
507
def autoscale_view (self , tight = None , scalex = True , scaley = True ,
508
- scalez = True ):
508
+ scalez = True ):
509
509
"""
510
510
Autoscale the view limits using the data limits.
511
511
See :meth:`matplotlib.axes.Axes.autoscale_view` for documentation.
@@ -631,7 +631,7 @@ def set_xlim3d(self, left=None, right=None, emit=True, auto=False,
631
631
for other in self ._shared_x_axes .get_siblings (self ):
632
632
if other is not self :
633
633
other .set_xlim (self .xy_viewLim .intervalx ,
634
- emit = False , auto = auto )
634
+ emit = False , auto = auto )
635
635
if other .figure != self .figure :
636
636
other .figure .canvas .draw_idle ()
637
637
self .stale = True
@@ -692,7 +692,7 @@ def set_ylim3d(self, bottom=None, top=None, emit=True, auto=False,
692
692
for other in self ._shared_y_axes .get_siblings (self ):
693
693
if other is not self :
694
694
other .set_ylim (self .xy_viewLim .intervaly ,
695
- emit = False , auto = auto )
695
+ emit = False , auto = auto )
696
696
if other .figure != self .figure :
697
697
other .figure .canvas .draw_idle ()
698
698
self .stale = True
@@ -753,7 +753,7 @@ def set_zlim3d(self, bottom=None, top=None, emit=True, auto=False,
753
753
for other in self ._shared_z_axes .get_siblings (self ):
754
754
if other is not self :
755
755
other .set_zlim (self .zz_viewLim .intervalx ,
756
- emit = False , auto = auto )
756
+ emit = False , auto = auto )
757
757
if other .figure != self .figure :
758
758
other .figure .canvas .draw_idle ()
759
759
self .stale = True
@@ -1241,7 +1241,7 @@ def get_zlabel(self):
1241
1241
label = self .zaxis .get_label ()
1242
1242
return label .get_text ()
1243
1243
1244
- #### Axes rectangle characteristics
1244
+ # Axes rectangle characteristics
1245
1245
1246
1246
def get_frame_on (self ):
1247
1247
"""
@@ -1344,7 +1344,7 @@ def tick_params(self, axis='both', **kwargs):
1344
1344
zkw .pop ('labelbottom' , None )
1345
1345
self .zaxis .set_tick_params (** zkw )
1346
1346
1347
- ### data limits, ticks, tick labels, and formatting
1347
+ # data limits, ticks, tick labels, and formatting
1348
1348
1349
1349
def invert_zaxis (self ):
1350
1350
"""
@@ -1820,9 +1820,9 @@ def plot_wireframe(self, X, Y, Z, *args, **kwargs):
1820
1820
tzlines = [tZ [i ] for i in cii ]
1821
1821
1822
1822
lines = ([list (zip (xl , yl , zl ))
1823
- for xl , yl , zl in zip (xlines , ylines , zlines )]
1824
- + [list (zip (xl , yl , zl ))
1825
- for xl , yl , zl in zip (txlines , tylines , tzlines )])
1823
+ for xl , yl , zl in zip (xlines , ylines , zlines )]
1824
+ + [list (zip (xl , yl , zl ))
1825
+ for xl , yl , zl in zip (txlines , tylines , tzlines )])
1826
1826
1827
1827
linec = art3d .Line3DCollection (lines , * args , ** kwargs )
1828
1828
self .add_collection (linec )
@@ -2333,7 +2333,7 @@ def bar(self, left, height, zs=0, zdir='z', *args, **kwargs):
2333
2333
return patches
2334
2334
2335
2335
def bar3d (self , x , y , z , dx , dy , dz , color = None ,
2336
- zsort = 'average' , shade = True , * args , ** kwargs ):
2336
+ zsort = 'average' , shade = True , lightsource = None , * args , ** kwargs ):
2337
2337
"""Generate a 3D barplot.
2338
2338
2339
2339
This method creates three dimensional barplot where the width,
@@ -2376,6 +2376,9 @@ def bar3d(self, x, y, z, dx, dy, dz, color=None,
2376
2376
When true, this shades the dark sides of the bars (relative
2377
2377
to the plot's source of light).
2378
2378
2379
+ lightsource : `~matplotlib.colors.LightSource`
2380
+ The lightsource to use when *shade* is True.
2381
+
2379
2382
**kwargs
2380
2383
Any additional keyword arguments are passed onto
2381
2384
`~.art3d.Poly3DCollection`.
@@ -2474,7 +2477,7 @@ def bar3d(self, x, y, z, dx, dy, dz, color=None,
2474
2477
2475
2478
if shade :
2476
2479
normals = self ._generate_normals (polys )
2477
- sfacecolors = self ._shade_colors (facecolors , normals )
2480
+ sfacecolors = self ._shade_colors (facecolors , normals , lightsource )
2478
2481
else :
2479
2482
sfacecolors = facecolors
2480
2483
0 commit comments