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

Method edge_centers

lib/matplotlib/widgets.py:3758–3770  ·  view source on GitHub ↗

Midpoint of rectangle edges in data coordinates from left, moving anti-clockwise.

(self)

Source from the content-addressed store, hash-verified

3756
3757 @property
3758 def edge_centers(self):
3759 """
3760 Midpoint of rectangle edges in data coordinates from left,
3761 moving anti-clockwise.
3762 """
3763 x0, y0, width, height = self._rect_bbox
3764 w = width / 2.
3765 h = height / 2.
3766 xe = x0, x0 + w, x0 + width, x0 + w
3767 ye = y0 + h, y0, y0 + h, y0 + height
3768 transform = self._get_rotation_transform()
3769 coords = transform.transform(np.array([xe, ye]).T).T
3770 return coords[0], coords[1]
3771
3772 @property
3773 def center(self):

Callers

nothing calls this directly

Calls 2

transformMethod · 0.45

Tested by

no test coverage detected