File tree 1 file changed +11
-2
lines changed
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):
2125
2125
((not patch .get_width ()) and (not patch .get_height ()))):
2126
2126
return
2127
2127
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
+
2130
2139
xys = patch .get_patch_transform ().transform (vertices )
2131
2140
if patch .get_data_transform () != self .transData :
2132
2141
patch_to_data = (patch .get_data_transform () -
You can’t perform that action at this time.
0 commit comments