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

Skip to content

Commit 3dbc142

Browse files
committed
fix tight_layout_bug
1 parent 23420a4 commit 3dbc142

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/matplotlib/axes/_base.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4213,6 +4213,8 @@ 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+
if isinstance(a, mspines.Spine) and self.figure.get_tight_layout():
4217+
continue
42164218
bbox = a.get_tightbbox(renderer)
42174219
if bbox is not None and (bbox.width != 0 or bbox.height != 0):
42184220
bb.append(bbox)

0 commit comments

Comments
 (0)