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

Skip to content

Commit 6ef6b37

Browse files
committed
Remove *args deprecations
1 parent 66b7bd3 commit 6ef6b37

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

doc/api/next_api_changes/removals/00001-DS.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,7 @@ The deprecated ``renderer`` arguments have been removed from:
1111

1212
The deprecated ``project`` argument has also been removed from
1313
``Line3DCollection.draw()``.
14+
15+
Passing arguments not specifically listed in the signatures of
16+
`.Axes3D.plot_surface` and `.Axes3D.plot_wireframe` is no longer supported.
17+
Pass any extra arguments as keyword arguments instead.

lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1484,8 +1484,7 @@ def plot(self, xs, ys, *args, zdir='z', **kwargs):
14841484

14851485
plot3D = plot
14861486

1487-
@_api.delete_parameter("3.4", "args", alternative="kwargs")
1488-
def plot_surface(self, X, Y, Z, *args, norm=None, vmin=None,
1487+
def plot_surface(self, X, Y, Z, *, norm=None, vmin=None,
14891488
vmax=None, lightsource=None, **kwargs):
14901489
"""
14911490
Create a surface plot.
@@ -1659,7 +1658,7 @@ def plot_surface(self, X, Y, Z, *args, norm=None, vmin=None,
16591658

16601659
# note that the striding causes some polygons to have more coordinates
16611660
# than others
1662-
polyc = art3d.Poly3DCollection(polys, *args, **kwargs)
1661+
polyc = art3d.Poly3DCollection(polys, **kwargs)
16631662

16641663
if fcolors is not None:
16651664
if shade:
@@ -1770,8 +1769,7 @@ def norm(x):
17701769

17711770
return colors
17721771

1773-
@_api.delete_parameter("3.4", "args", alternative="kwargs")
1774-
def plot_wireframe(self, X, Y, Z, *args, **kwargs):
1772+
def plot_wireframe(self, X, Y, Z, **kwargs):
17751773
"""
17761774
Plot a 3D wireframe.
17771775
@@ -1883,7 +1881,7 @@ def plot_wireframe(self, X, Y, Z, *args, **kwargs):
18831881
+ [list(zip(xl, yl, zl))
18841882
for xl, yl, zl in zip(txlines, tylines, tzlines)])
18851883

1886-
linec = art3d.Line3DCollection(lines, *args, **kwargs)
1884+
linec = art3d.Line3DCollection(lines, **kwargs)
18871885
self.add_collection(linec)
18881886
self.auto_scale_xyz(X, Y, Z, had_data)
18891887

0 commit comments

Comments
 (0)