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 619baed

Browse filesBrowse files
authored
Merge pull request #14375 from meeseeksmachine/auto-backport-of-pr-14374-on-v3.1.x
Backport PR #14374 on branch v3.1.x (Check that the figure patch is in bbox_artists before trying to remove.)
2 parents 6075ec8 + fbbede3 commit 619baed
Copy full SHA for 619baed

File tree

Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed

‎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.