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

Skip to content

Commit 5daa70b

Browse files
committed
Add proj3d deprecations to mark progress
1 parent 1c1eb22 commit 5daa70b

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

lib/mpl_toolkits/mplot3d/proj3d.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
from matplotlib import _api
88

9-
9+
@_api.deprecate("3.10")
1010
def world_transformation(xmin, xmax,
1111
ymin, ymax,
1212
zmin, zmax, pb_aspect=None):
@@ -37,6 +37,7 @@ def rotation_about_vector(v, angle):
3737
return _rotation_about_vector(v, angle)
3838

3939

40+
@_api.deprecate("3.10")
4041
def _rotation_about_vector(v, angle):
4142
"""
4243
Produce a rotation matrix for an angle in radians about a vector.
@@ -93,6 +94,7 @@ def _view_axes(E, R, V, roll):
9394
return u, v, w
9495

9596

97+
@_api.deprecate("3.10")
9698
def _view_transformation_uvw(u, v, w, E):
9799
"""
98100
Return the view transformation matrix.
@@ -142,6 +144,7 @@ def persp_transformation(zfront, zback, focal_length):
142144
return _persp_transformation(zfront, zback, focal_length)
143145

144146

147+
@_api.deprecate("3.10")
145148
def _persp_transformation(zfront, zback, focal_length):
146149
e = focal_length
147150
a = 1 # aspect ratio
@@ -159,6 +162,7 @@ def ortho_transformation(zfront, zback):
159162
return _ortho_transformation(zfront, zback)
160163

161164

165+
@_api.deprecate("3.10")
162166
def _ortho_transformation(zfront, zback):
163167
# note: w component in the resulting vector will be (zback-zfront), not 1
164168
a = -(zfront + zback)
@@ -170,6 +174,7 @@ def _ortho_transformation(zfront, zback):
170174
return proj_matrix
171175

172176

177+
@_api.deprecate("3.10")
173178
def _proj_transform_vec(vec, M):
174179
vecw = np.dot(M, vec)
175180
w = vecw[3]
@@ -178,6 +183,7 @@ def _proj_transform_vec(vec, M):
178183
return txs, tys, tzs
179184

180185

186+
@_api.deprecate("3.10")
181187
def _proj_transform_vec_clip(vec, M):
182188
vecw = np.dot(M, vec)
183189
w = vecw[3]
@@ -189,6 +195,7 @@ def _proj_transform_vec_clip(vec, M):
189195
return txs, tys, tzs, tis
190196

191197

198+
@_api.deprecate("3.10")
192199
def inv_transform(xs, ys, zs, invM):
193200
"""
194201
Transform the points by the inverse of the projection matrix, *invM*.
@@ -203,10 +210,12 @@ def inv_transform(xs, ys, zs, invM):
203210
return vecr[0], vecr[1], vecr[2]
204211

205212

213+
@_api.deprecate("3.10")
206214
def _vec_pad_ones(xs, ys, zs):
207215
return np.array([xs, ys, zs, np.ones_like(xs)])
208216

209217

218+
@_api.deprecate("3.10")
210219
def proj_transform(xs, ys, zs, M):
211220
"""
212221
Transform the points by the projection matrix *M*.
@@ -220,6 +229,7 @@ def proj_transform(xs, ys, zs, M):
220229
alternative="proj_transform")(proj_transform)
221230

222231

232+
@_api.deprecate("3.10")
223233
def proj_transform_clip(xs, ys, zs, M):
224234
"""
225235
Transform the points by the projection matrix
@@ -235,6 +245,7 @@ def proj_points(points, M):
235245
return _proj_points(points, M)
236246

237247

248+
@_api.deprecate("3.10")
238249
def _proj_points(points, M):
239250
return np.column_stack(_proj_trans_points(points, M))
240251

@@ -244,6 +255,7 @@ def proj_trans_points(points, M):
244255
return _proj_trans_points(points, M)
245256

246257

258+
@_api.deprecate("3.10")
247259
def _proj_trans_points(points, M):
248260
xs, ys, zs = zip(*points)
249261
return proj_transform(xs, ys, zs, M)

0 commit comments

Comments
 (0)