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

Class ScaledTranslation

lib/matplotlib/transforms.py:2700–2723  ·  view source on GitHub ↗

A transformation that translates by *xt* and *yt*, after *xt* and *yt* have been transformed by *scale_trans*.

Source from the content-addressed store, hash-verified

2698
2699
2700class ScaledTranslation(Affine2DBase):
2701 """
2702 A transformation that translates by *xt* and *yt*, after *xt* and *yt*
2703 have been transformed by *scale_trans*.
2704 """
2705 def __init__(self, xt, yt, scale_trans, **kwargs):
2706 super().__init__(**kwargs)
2707 self._t = (xt, yt)
2708 self._scale_trans = scale_trans
2709 self.set_children(scale_trans)
2710 self._mtx = None
2711 self._inverted = None
2712
2713 __str__ = _make_str_method("_t")
2714
2715 def get_matrix(self):
2716 # docstring inherited
2717 if self._invalid:
2718 # A bit faster than np.identity(3).
2719 self._mtx = IdentityTransform._mtx.copy()
2720 self._mtx[:2, 2] = self._scale_trans.transform(self._t)
2721 self._invalid = 0
2722 self._inverted = None
2723 return self._mtx
2724
2725
2726class _ScaledRotation(Affine2DBase):

Callers 3

__init__Method · 0.90
label_subplots.pyFile · 0.90
offset_copyFunction · 0.85

Calls 1

_make_str_methodFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…