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

Skip to content

Commit 1d8c18b

Browse files
committed
make sure fill values for shade array are within the correct range
1 parent 81b5241 commit 1d8c18b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1678,10 +1678,10 @@ def _shade_colors(self, color, normals):
16781678
if proj3d.mod(n) else np.nan
16791679
for n in normals])
16801680
mask = ~np.isnan(shade)
1681-
shade[~mask] = 0
16821681

16831682
if len(shade[mask]) > 0:
16841683
norm = Normalize(min(shade[mask]), max(shade[mask]))
1684+
shade[~mask] = min(shade[mask])
16851685
color = colorConverter.to_rgba_array(color)
16861686
# shape of color should be (M, 4) (where M is number of faces)
16871687
# shape of shade should be (M,)

0 commit comments

Comments
 (0)