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

Class _ScaledRotation

lib/matplotlib/transforms.py:2726–2742  ·  view source on GitHub ↗

A transformation that applies rotation by *theta*, after transform by *trans_shift*.

Source from the content-addressed store, hash-verified

2724
2725
2726class _ScaledRotation(Affine2DBase):
2727 """
2728 A transformation that applies rotation by *theta*, after transform by *trans_shift*.
2729 """
2730 def __init__(self, theta, trans_shift):
2731 super().__init__()
2732 self._theta = theta
2733 self._trans_shift = trans_shift
2734 self._mtx = None
2735
2736 def get_matrix(self):
2737 if self._invalid:
2738 transformed_coords = self._trans_shift.transform([[self._theta, 0]])[0]
2739 adjusted_theta = transformed_coords[0]
2740 rotation = Affine2D().rotate(adjusted_theta)
2741 self._mtx = rotation.get_matrix()
2742 return self._mtx
2743
2744
2745class AffineDeltaTransform(Affine2DBase):

Callers 3

errorbarMethod · 0.90

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…