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

Skip to content

Commit e7599ff

Browse files
authored
Merge pull request #12430 from timhoffm/plot-surface-shade-none
Deprecate Axes3D.plot_surface(shade=None)
2 parents 8ca36cb + 526b856 commit e7599ff

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Deprecations
2+
````````````
3+
4+
The following keyword arguments are deprecated:
5+
6+
- Passing ``shade=None`` to
7+
`~mpl_toolkits.mplot3d.axes3d.Axes3D.plot_surface` is deprecated. This was
8+
an unintended implementation detail with the same semantics as
9+
``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)