Skip to content

Commit

Permalink
Cut translate boilerplate; use rotate_deg_around
Browse files Browse the repository at this point in the history
  • Loading branch information
dmcdougall committed Nov 11, 2012
1 parent 2b906ee commit aeb1ac7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/matplotlib/patches.py
Expand Up @@ -579,7 +579,7 @@ def _update_patch_transform(self):
height = self.convert_yunits(self._height)
bbox = transforms.Bbox.from_bounds(x, y, width, height)
rot_trans = transforms.Affine2D()
rot_trans.translate(-x, -y).rotate_deg(self._angle).translate(x, y)
rot_trans.rotate_deg_around(x, y, self._angle)
self._rect_transform = transforms.BboxTransformTo(bbox)
self._rect_transform += rot_trans

Expand Down

0 comments on commit aeb1ac7

Please sign in to comment.