MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / geometry

Method geometry

lib/matplotlib/widgets.py:3870–3882  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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(

Callers 2

showtipFunction · 0.80

Calls 4

get_vertsMethod · 0.80
invertedMethod · 0.45
transformMethod · 0.45
get_dataMethod · 0.45

Tested by 1