8000 fix tight_layout_bug · matplotlib/matplotlib@e8b77d6 · GitHub
[go: up one dir, main page]

Skip to content

Commit e8b77d6

Browse files
committed
fix tight_layout_bug
1 parent 23420a4 commit e8b77d6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/matplotlib/axes/_base.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4213,9 +4213,10 @@ def get_tightbbox(self, renderer, call_axes_locator=True,
42134213
bbox_artists = self.get_default_bbox_extra_artists()
42144214

42154215
for a in bbox_artists:
4216-
bbox = a.get_tightbbox(renderer)
4217-
if bbox is not None and (bbox.width != 0 or bbox.height != 0):
4218-
bb.append(bbox)
4216+
if not isinstance(a, mspines.Spine):
4217+
bbox = a.get_tightbbox(renderer)
4218+
if bbox is not None and (bbox.width != 0 or bbox.height != 0):
4219+
bb.append(bbox)
42194220

42204221
_bbox = mtransforms.Bbox.union(
42214222
[b for b in bb if b.width != 0 or b.height != 0])

0 commit comments

Comments
 (0)
0