Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ad31040 commit 2e71850Copy full SHA for 2e71850
lib/matplotlib/axes/_base.py
@@ -2095,10 +2095,9 @@ def _update_patch_limits(self, patch):
2095
if (isinstance(patch, mpatches.Rectangle) and
2096
((not patch.get_width()) and (not patch.get_height()))):
2097
return
2098
- vertices = np.array([v for s in patch.get_path().iter_segments()
2099
- if s[1] != mpath.Path.CLOSEPOLY
2100
- and s[1] != mpath.Path.STOP
2101
- for v in s[0]]).reshape([-1, 2])
+ p = patch.get_path()
+ vertices = p.vertices if p.codes is None else p.vertices[np.isin(
+ p.codes, (mpath.Path.CLOSEPOLY, mpath.Path.STOP), invert=True)]
2102
if vertices.size > 0:
2103
xys = patch.get_patch_transform().transform(vertices)
2104
if patch.get_data_transform() != self.transData:
0 commit comments