Notes ----- This cannot be called until after this has been added to an Axes, otherwise unit conversion will fail. This makes it very important to call the accessor method and not directly access the transformation member variable.
(self)
| 1743 | self._patch_transform = transforms.IdentityTransform() |
| 1744 | |
| 1745 | def _recompute_transform(self): |
| 1746 | """ |
| 1747 | Notes |
| 1748 | ----- |
| 1749 | This cannot be called until after this has been added to an Axes, |
| 1750 | otherwise unit conversion will fail. This makes it very important to |
| 1751 | call the accessor method and not directly access the transformation |
| 1752 | member variable. |
| 1753 | """ |
| 1754 | center = (self.convert_xunits(self._center[0]), |
| 1755 | self.convert_yunits(self._center[1])) |
| 1756 | width = self.convert_xunits(self._width) |
| 1757 | height = self.convert_yunits(self._height) |
| 1758 | self._patch_transform = transforms.Affine2D() \ |
| 1759 | .scale(width * 0.5, height * 0.5 * self._aspect_ratio_correction) \ |
| 1760 | .rotate_deg(self.angle) \ |
| 1761 | .scale(1, 1 / self._aspect_ratio_correction) \ |
| 1762 | .translate(*center) |
| 1763 | |
| 1764 | def get_path(self): |
| 1765 | """Return the path of the ellipse.""" |
no test coverage detected