MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / _scale_proj_transform_vectors

Function _scale_proj_transform_vectors

lib/mpl_toolkits/mplot3d/proj3d.py:169–186  ·  view source on GitHub ↗

Apply scale transforms and project vectors. Parameters ---------- vecs : ... x 3 np.ndarray Input vectors. axes : Axes3D The 3D axes (used for scale transforms and projection matrix).

(vecs, axes)

Source from the content-addressed store, hash-verified

167
168
169def _scale_proj_transform_vectors(vecs, axes):
170 """
171 Apply scale transforms and project vectors.
172
173 Parameters
174 ----------
175 vecs : ... x 3 np.ndarray
176 Input vectors.
177 axes : Axes3D
178 The 3D axes (used for scale transforms and projection matrix).
179 """
180 result_shape = vecs.shape
181 xs, ys, zs = _apply_scale_transforms(
182 vecs[..., 0], vecs[..., 1], vecs[..., 2], axes)
183 vec = _vec_pad_ones(xs.ravel(), ys.ravel(), zs.ravel())
184 product = np.dot(axes.M, vec)
185 tvecs = product[:3] / product[3]
186 return tvecs.T.reshape(result_shape)
187
188
189def _proj_transform_vec_clip(vec, M, focal_length):

Callers

nothing calls this directly

Calls 3

_apply_scale_transformsFunction · 0.85
_vec_pad_onesFunction · 0.85
dotMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…