Return an array of shape (2, 5) containing the x (``RectangleSelector.geometry[1, :]``) and y (``RectangleSelector.geometry[0, :]``) data coordinates of the four corners of the rectangle starting and ending in the top left corner.
(self)
| 3868 | |
| 3869 | @property |
| 3870 | def geometry(self): |
| 3871 | """ |
| 3872 | Return an array of shape (2, 5) containing the |
| 3873 | x (``RectangleSelector.geometry[1, :]``) and |
| 3874 | y (``RectangleSelector.geometry[0, :]``) data coordinates of the four |
| 3875 | corners of the rectangle starting and ending in the top left corner. |
| 3876 | """ |
| 3877 | if hasattr(self._selection_artist, 'get_verts'): |
| 3878 | xfm = self.ax.transData.inverted() |
| 3879 | y, x = xfm.transform(self._selection_artist.get_verts()).T |
| 3880 | return np.array([x, y]) |
| 3881 | else: |
| 3882 | return np.array(self._selection_artist.get_data()) |
| 3883 | |
| 3884 | |
| 3885 | @_docstring.Substitution(_RECTANGLESELECTOR_PARAMETERS_DOCSTRING.replace( |