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

Appearance settings

Commit fbbede3

Browse filesBrowse files
anntzerMeeseeksDev[bot]
authored andcommitted
Backport PR #14374: Check that the figure patch is in bbox_artists before trying to remove.
1 parent 6075ec8 commit fbbede3
Copy full SHA for fbbede3

File tree

Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Open diff view settings
Collapse file

‎lib/matplotlib/figure.py‎

Copy file name to clipboardExpand all lines: lib/matplotlib/figure.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2329,7 +2329,8 @@ def get_default_bbox_extra_artists(self):
23292329
if ax.get_visible():
23302330
bbox_artists.extend(ax.get_default_bbox_extra_artists())
23312331
# we don't want the figure's patch to influence the bbox calculation
2332-
bbox_artists.remove(self.patch)
2332+
if self.patch in bbox_artists:
2333+
bbox_artists.remove(self.patch)
23332334
return bbox_artists
23342335

23352336
def get_tightbbox(self, renderer, bbox_extra_artists=None):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.