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

Method get_affine

lib/matplotlib/transforms.py:2308–2321  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2306 return BlendedGenericTransform(self._x.inverted(), self._y.inverted())
2307
2308 def get_affine(self):
2309 # docstring inherited
2310 if self._invalid or self._affine is None:
2311 if self._x == self._y:
2312 self._affine = self._x.get_affine()
2313 else:
2314 x_mtx = self._x.get_affine().get_matrix()
2315 y_mtx = self._y.get_affine().get_matrix()
2316 # We already know the transforms are separable, so we can skip
2317 # setting b and c to zero.
2318 mtx = np.array([x_mtx[0], y_mtx[1], [0.0, 0.0, 1.0]])
2319 self._affine = Affine2D(mtx)
2320 self._invalid = 0
2321 return self._affine
2322
2323
2324class BlendedAffine2D(_BlendedMixin, Affine2DBase):

Callers 1

test_clipping_of_logFunction · 0.95

Calls 3

Affine2DClass · 0.85
get_affineMethod · 0.45
get_matrixMethod · 0.45

Tested by 1

test_clipping_of_logFunction · 0.76