diff --git a/lib/matplotlib/widgets.py b/lib/matplotlib/widgets.py index 59631fc279bd..005cf96228eb 100644 --- a/lib/matplotlib/widgets.py +++ b/lib/matplotlib/widgets.py @@ -3233,7 +3233,10 @@ def _get_rotation_transform(self): @property def corners(self): - """Corners of rectangle from lower left, moving clockwise.""" + """ + Corners of rectangle in data coordinates from lower left, + moving clockwise. + """ x0, y0, width, height = self._rect_bbox xc = x0, x0 + width, x0 + width, x0 yc = y0, y0, y0 + height, y0 + height @@ -3243,7 +3246,10 @@ def corners(self): @property def edge_centers(self): - """Midpoint of rectangle edges from left, moving anti-clockwise.""" + """ + Midpoint of rectangle edges in data coordiantes from left, + moving anti-clockwise. + """ x0, y0, width, height = self._rect_bbox w = width / 2. h = height / 2. @@ -3255,15 +3261,15 @@ def edge_centers(self): @property def center(self): - """Center of rectangle.""" + """Center of rectangle in data coordinates.""" x0, y0, width, height = self._rect_bbox return x0 + width / 2., y0 + height / 2. @property def extents(self): """ - Return (xmin, xmax, ymin, ymax) as defined by the bounding box before - rotation. + Return (xmin, xmax, ymin, ymax) in data coordinates as defined by the + bounding box before rotation. """ x0, y0, width, height = self._rect_bbox xmin, xmax = sorted([x0, x0 + width]) @@ -3360,9 +3366,8 @@ def geometry(self): """ Return an array of shape (2, 5) containing the x (``RectangleSelector.geometry[1, :]``) and - y (``RectangleSelector.geometry[0, :]``) coordinates - of the four corners of the rectangle starting and ending - in the top left corner. + y (``RectangleSelector.geometry[0, :]``) data coordinates of the four + corners of the rectangle starting and ending in the top left corner. """ if hasattr(self._selection_artist, 'get_verts'): xfm = self.ax.transData.inverted() pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy