8000 Remove deprecated methods and attributed in Axes3D by oscargus · Pull Request #26798 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Remove deprecated methods and attributed in Axes3D #26798

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions doc/api/next_api_changes/removals/26798-OG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
``unit_cube``, ``tunit_cube``, and ``tunit_edges``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

... of `.Axes3D` are removed without replacements.

``axes3d.vvec``, ``axes3d.eye``, ``axes3d.sx``, and ``axes3d.sy``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

... are removed without replacement.
3 changes: 0 additions & 3 deletions doc/api/toolkits/mplot3d/axes3d.rst
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,6 @@ Aliases and deprecated methods
set_zlim3d
stem3D
text3D
tunit_cube
tunit_edges
unit_cube


Other
Expand Down
22 changes: 0 additions & 22 deletions lib/mpl_toolkits/mplot3d/axes3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,6 @@ class Axes3D(Axes):
Axes._shared_axes["z"] = cbook.Grouper()
Axes._shared_axes["view"] = cbook.Grouper()

vvec = _api.deprecate_privatize_attribute("3.7")
eye = _api.deprecate_privatize_attribute("3.7")
sx = _api.deprecate_privatize_attribute("3.7")
sy = _api.deprecate_privatize_attribute("3.7")

def __init__(
self, fig, rect=None, *args,
elev=30, azim=-60, roll=0, sharez=None, proj_type='persp',
Expand Down Expand Up @@ -227,10 +222,6 @@ def get_zaxis(self):
get_zgridlines = _axis_method_wrapper("zaxis", "get_gridlines")
get_zticklines = _axis_method_wrapper("zaxis", "get_ticklines")

@_api.deprecated("3.7")
def unit_cube(self, vals=None):
return self._unit_cube(vals)

def _unit_cube(self, vals=None):
minx, maxx, miny, maxy, minz, maxz = vals or self.get_w_lims()
return [(minx, miny, minz),
Expand All @@ -242,21 +233,13 @@ def _unit_cube(self, vals=None):
(maxx, maxy, maxz),
(minx, maxy, maxz)]

@_api.deprecated("3.7")
def tunit_cube(self, vals=None, M=None):
return self._tunit_cube(vals, M)

def _tunit_cube(self, vals=None, M=None):
if M is None:
M = self.M
xyzs = self._unit_cube(vals)
tcube = proj3d._proj_points(xyzs, M)
return tcube

@_api.deprecated("3.7")
def tunit_edges(self, vals=None, M=None):
return self._tunit_edges(vals, M)

def _tunit_edges(self, vals=None, M=None):
tc = self._tunit_cube(vals, M)
edges = [(tc[0], tc[1]),
Expand Down Expand Up @@ -943,11 +926,6 @@ def get_proj(self):
# towards the middle of the box of data from a distance:
eye = R + self._dist * ps

# vvec, self._vvec and self._eye are unused, remove when deprecated
vvec = R - eye
self._eye = eye
self._vvec = vvec / np.linalg.norm(vvec)

# Calculate the viewing axes for the eye position
u, v, w = self._calc_view_axes(eye)
self._view_u = u # _view_u is towards the right of the screen
Expand Down
0