Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ec18ea9

Browse files
committed
BUG: remove broken shading in plot_surface
This didn't respect the x and y coordinates, so plotting `x{::-1], y{::-1], z[::-1,::-1]` would result in different shading to `x, y, z`. It also looked super screwy, and could only be triggered if `facecolors="do something wacky"` was passed
1 parent 9e73e25 commit ec18ea9

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1648,10 +1648,6 @@ def plot_surface(self, X, Y, Z, *args, norm=None, vmin=None,
16481648
cmap = kwargs.get('cmap', None)
16491649
shade = kwargs.pop('shade', cmap is None)
16501650

1651-
# Shade the data
1652-
if shade and cmap is not None and fcolors is not None:
1653-
fcolors = self._shade_colors_lightsource(Z, cmap, lightsource)
1654-
16551651
# evenly spaced, and including both endpoints
16561652
row_inds = list(range(0, rows-1, rstride)) + [rows-1]
16571653
col_inds = list(range(0, cols-1, cstride)) + [cols-1]
@@ -1758,11 +1754,6 @@ def _shade_colors(self, color, normals, lightsource=None):
17581754

17591755
return colors
17601756

1761-
def _shade_colors_lightsource(self, data, cmap, lightsource):
1762-
if lightsource is None:
1763-
lightsource = LightSource(azdeg=135, altdeg=55)
1764-
return lightsource.shade(data, cmap)
1765-
17661757
def plot_wireframe(self, X, Y, Z, *args, **kwargs):
17671758
"""
17681759
Plot a 3D wireframe.

0 commit comments

Comments
 (0)