Parameters ---------- xy : (float, float) The anchor point. width : float Rectangle width. height : float Rectangle height. angle : float, default: 0 Rotation in degrees anti-clockwise about the rotation
(self, xy, width, height, *,
angle=0.0, rotation_point='xy', **kwargs)
| 849 | |
| 850 | @_docstring.interpd |
| 851 | def __init__(self, xy, width, height, *, |
| 852 | angle=0.0, rotation_point='xy', **kwargs): |
| 853 | """ |
| 854 | Parameters |
| 855 | ---------- |
| 856 | xy : (float, float) |
| 857 | The anchor point. |
| 858 | width : float |
| 859 | Rectangle width. |
| 860 | height : float |
| 861 | Rectangle height. |
| 862 | angle : float, default: 0 |
| 863 | Rotation in degrees anti-clockwise about the rotation point. |
| 864 | rotation_point : {'xy', 'center', (number, number)}, default: 'xy' |
| 865 | If ``'xy'``, rotate around the anchor point. If ``'center'`` rotate |
| 866 | around the center. If 2-tuple of number, rotate around this |
| 867 | coordinate. |
| 868 | |
| 869 | Other Parameters |
| 870 | ---------------- |
| 871 | **kwargs : `~matplotlib.patches.Patch` properties |
| 872 | %(Patch:kwdoc)s |
| 873 | |
| 874 | See Also |
| 875 | -------- |
| 876 | FancyBboxPatch : A rectangle with a fancy box style, e.g. rounded corners. |
| 877 | """ |
| 878 | super().__init__(**kwargs) |
| 879 | self._x0 = xy[0] |
| 880 | self._y0 = xy[1] |
| 881 | self._width = width |
| 882 | self._height = height |
| 883 | self.angle = float(angle) |
| 884 | self.rotation_point = rotation_point |
| 885 | # Required for RectangleSelector with axes aspect ratio != 1 |
| 886 | # The patch is defined in data coordinates and when changing the |
| 887 | # selector with square modifier and not in data coordinates, we need |
| 888 | # to correct for the aspect ratio difference between the data and |
| 889 | # display coordinate systems. Its value is typically provide by |
| 890 | # Axes._get_aspect_ratio() |
| 891 | self._aspect_ratio_correction = 1.0 |
| 892 | self._convert_units() # Validate the inputs. |
| 893 | |
| 894 | def get_path(self): |
| 895 | """Return the vertices of the rectangle.""" |
nothing calls this directly
no test coverage detected