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 150faa1

Browse filesBrowse files
authored
Check that the figure patch is in bbox_artists before trying to remove. (#14374)
Check that the figure patch is in bbox_artists before trying to remove.
2 parents 765d452 + 2079bde commit 150faa1
Copy full SHA for 150faa1

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
@@ -2340,7 +2340,8 @@ def get_default_bbox_extra_artists(self):
23402340
if ax.get_visible():
23412341
bbox_artists.extend(ax.get_default_bbox_extra_artists())
23422342
# we don't want the figure's patch to influence the bbox calculation
2343-
bbox_artists.remove(self.patch)
2343+
if self.patch in bbox_artists:
2344+
bbox_artists.remove(self.patch)
23442345
return bbox_artists
23452346

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