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

Skip to content

Commit 86f4f64

Browse files
Deprecation warnings for Axes3D.eye, .vvec
1 parent 695fd50 commit 86f4f64

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ class Axes3D(Axes):
5252
Axes._shared_axes["z"] = cbook.Grouper()
5353

5454
dist = _api.deprecate_privatize_attribute("3.6")
55+
vvec = _api.deprecate_privatize_attribute("3.6")
56+
eye = _api.deprecate_privatize_attribute("3.6")
5557

5658
def __init__(
5759
self, fig, rect=None, *args,
@@ -862,7 +864,11 @@ def get_proj(self):
862864
# The coordinates for the eye viewing point. The eye is looking
863865
# towards the middle of the box of data from a distance:
864866
eye = R + self._dist * ps
865-
self.eye = eye
867+
868+
# vvec, self._vvec and self._eye are unused, remove when deprecated
869+
vvec = R - eye
870+
self._eye = eye
871+
self._vvec = vvec / np.linalg.norm(vvec)
866872

867873
# Calculate the viewing axes for the eye position
868874
u, v, n = self._calc_view_axes(eye)

0 commit comments

Comments
 (0)