Skip to content

Commit 3bd268d

Browse files
committed
Deprecate Axes3D.plot_surface(shade=None)
1 parent 1c17868 commit 3bd268d

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Deprecations
2+
````````````
3+
4+
The following keyword arguments are deprecated:
5+
6+
- Passing ``shade=None`` to `.Axes3D.plot_surface` is deprecated. This was
7+
an unintended implementation detail with the same semantics as
8+
``shade=False``. Please use the latter code instead.

lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1651,6 +1651,12 @@ def plot_surface(self, X, Y, Z, *args, norm=None, vmin=None,
16511651

16521652
cmap = kwargs.get('cmap', None)
16531653
shade = kwargs.pop('shade', cmap is None)
1654+
if shade is None:
1655+
cbook.warn_deprecated(
1656+
"3.1",
1657+
"Passing shade=None to Axes3D.plot_surface() is deprecated "
1658+
"since matplotlib 3.1 and will change its semantic or raise "
1659+
"an error in matplotlib 3.3. Please use shade=False instead.")
16541660

16551661
# evenly spaced, and including both endpoints
16561662
row_inds = list(range(0, rows-1, rstride)) + [rows-1]

0 commit comments

Comments
 (0)