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

Skip to content

Commit 57fe938

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 e1d5d1e commit 57fe938

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1648,9 +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)
16541651

16551652
# evenly spaced, and including both endpoints
16561653
row_inds = list(range(0, rows-1, rstride)) + [rows-1]
@@ -1758,11 +1755,6 @@ def _shade_colors(self, color, normals, lightsource=None):
17581755

17591756
return colors
17601757

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-
17661758
def plot_wireframe(self, X, Y, Z, *args, **kwargs):
17671759
"""
17681760
Plot a 3D wireframe.

0 commit comments

Comments
 (0)