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

Method rotate_around

lib/matplotlib/transforms.py:2065–2073  ·  view source on GitHub ↗

Add a rotation (in radians) around the point (x, y) in place. Returns *self*, so this method can easily be chained with more calls to :meth:`rotate`, :meth:`rotate_deg`, :meth:`translate` and :meth:`scale`.

(self, x, y, theta)

Source from the content-addressed store, hash-verified

2063 return self.rotate(math.radians(degrees))
2064
2065 def rotate_around(self, x, y, theta):
2066 """
2067 Add a rotation (in radians) around the point (x, y) in place.
2068
2069 Returns *self*, so this method can easily be chained with more
2070 calls to :meth:`rotate`, :meth:`rotate_deg`, :meth:`translate`
2071 and :meth:`scale`.
2072 """
2073 return self.translate(-x, -y).rotate(theta).translate(x, y)
2074
2075 def rotate_deg_around(self, x, y, degrees):
2076 """

Callers 4

test_corner_centerFunction · 0.80
test_rgba_clean_edgesFunction · 0.80
test_rotate_aroundMethod · 0.80

Calls 2

translateMethod · 0.95
rotateMethod · 0.45

Tested by 4

test_corner_centerFunction · 0.64
test_rgba_clean_edgesFunction · 0.64
test_rotate_aroundMethod · 0.64