Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ebf29ff

Browse files
committed
MNT: only account for Artists once in fig.get_tightbbox
1 parent ff552f4 commit ebf29ff

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/matplotlib/figure.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1672,9 +1672,7 @@ def get_default_bbox_extra_artists(self):
16721672
"""
16731673
bbox_artists = [artist for artist in self.get_children()
16741674
if (artist.get_visible() and artist.get_in_layout())]
1675-
for ax in self.axes:
1676-
if ax.get_visible():
1677-
bbox_artists.extend(ax.get_default_bbox_extra_artists())
1675+
16781676
return bbox_artists
16791677

16801678
@_api.make_keyword_only("3.8", "bbox_extra_artists")

0 commit comments

Comments
 (0)