@@ -844,6 +844,14 @@ def get_corners(self):
844
844
return self .get_patch_transform ().transform (
845
845
[(0 , 0 ), (1 , 0 ), (1 , 1 ), (0 , 1 )])
846
846
847
+ def _get_edge_midpoints (self ):
848
+ """
849
+ Return the edge midpoints of the rectangle, moving anti-clockwise from
850
+ the centre of the left-hand edge.
851
+ """
852
+ return self .get_patch_transform ().transform (
853
+ [(0 , 0.5 ), (0.5 , 0 ), (1 , 0.5 ), (0.5 , 1 )])
854
+
847
855
def get_center (self ):
848
856
"""Return the centre of the rectangle."""
849
857
return self .get_patch_transform ().transform ((0.5 , 0.5 ))
@@ -1761,6 +1769,14 @@ def get_co_vertices(self):
1761
1769
ret = self .get_patch_transform ().transform ([(0 , 1 ), (0 , - 1 )])
1762
1770
return [tuple (x ) for x in ret ]
1763
1771
1772
+ def _get_edge_midpoints (self ):
1773
+ """
1774
+ Return the edge midpoints of the ellipse, moving anti-clockwise from
1775
+ the centre of the left-hand edge.
1776
+ """
1777
+ return self .get_patch_transform ().transform (
1778
+ [(0 , 0.5 ), (0.5 , 0 ), (1 , 0.5 ), (0.5 , 1 )])
1779
+
1764
1780
1765
1781
class Annulus (Patch ):
1766
1782
"""
0 commit comments