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

Skip to content

Commit 68c87d7

Browse files
authored
Merge pull request #28201 from AnsonTran/deprecate-get-vector
Deprecate `Poly3DCollection.get_vector`
2 parents 1b7093d + 86854c6 commit 68c87d7

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
``Poly3DCollection.get_vector``
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
... is deprecated with no replacement.

lib/mpl_toolkits/mplot3d/art3d.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from contextlib import contextmanager
1515

1616
from matplotlib import (
17-
artist, cbook, colors as mcolors, lines, text as mtext,
17+
_api, artist, cbook, colors as mcolors, lines, text as mtext,
1818
path as mpath)
1919
from matplotlib.collections import (
2020
Collection, LineCollection, PolyCollection, PatchCollection, PathCollection)
@@ -948,7 +948,11 @@ def set_zsort(self, zsort):
948948
self._sort_zpos = None
949949
self.stale = True
950950

951+
@_api.deprecated("3.10")
951952
def get_vector(self, segments3d):
953+
return self._get_vector(segments3d)
954+
955+
def _get_vector(self, segments3d):
952956
"""Optimize points for projection."""
953957
if len(segments3d):
954958
xs, ys, zs = np.vstack(segments3d).T
@@ -974,7 +978,7 @@ def set_verts(self, verts, closed=True):
974978
Whether the polygon should be closed by adding a CLOSEPOLY
975979
connection at the end.
976980
"""
977-
self.get_vector(verts)
981+
self._get_vector(verts)
978982
# 2D verts will be updated at draw time
979983
super().set_verts([], False)
980984
self._closed = closed

0 commit comments

Comments
 (0)