File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -2125,8 +2125,17 @@ def _update_patch_limits(self, patch):
21252125 ((not patch .get_width ()) and (not patch .get_height ()))):
21262126 return
21272127 p = patch .get_path ()
2128- # Get vertices of the bounding box
2129- vertices = p .get_extents ().get_points ()
2128+ # Get all vertices on the path
2129+ # Loop through each sement to get extrema (as opposed to control points)
2130+ # for Bezier curve sections
2131+ vertices = []
2132+ for curve , code in p .iter_bezier ():
2133+ _ , dzeros = curve .axis_aligned_extrema ()
2134+ # as can the ends of the curve
2135+ vertices .append (curve ([0 , * dzeros , 1 ]))
2136+
2137+ vertices = np .row_stack (vertices )
2138+
21302139 xys = patch .get_patch_transform ().transform (vertices )
21312140 if patch .get_data_transform () != self .transData :
21322141 patch_to_data = (patch .get_data_transform () -
You can’t perform that action at this time.
0 commit comments