Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0c7663d

Browse files
committed
Get all vertices
1 parent6f49268 commit0c7663d

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

‎lib/matplotlib/axes/_base.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2125,8 +2125,17 @@ def _update_patch_limits(self, patch):
21252125
((notpatch.get_width())and (notpatch.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+
forcurve,codeinp.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
ifpatch.get_data_transform()!=self.transData:
21322141
patch_to_data= (patch.get_data_transform()-

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp