Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit aeb1ac7

Browse files
committed
Cut translate boilerplate; use rotate_deg_around
1 parent 2b906ee commit aeb1ac7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/patches.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ def _update_patch_transform(self):
579579
height = self.convert_yunits(self._height)
580580
bbox = transforms.Bbox.from_bounds(x, y, width, height)
581581
rot_trans = transforms.Affine2D()
582-
rot_trans.translate(-x, -y).rotate_deg(self._angle).translate(x, y)
582+
rot_trans.rotate_deg_around(x, y, self._angle)
583583
self._rect_transform = transforms.BboxTransformTo(bbox)
584584
self._rect_transform += rot_trans
585585

0 commit comments

Comments
 (0)