8000 FIX: continue to bail tight layout if reect supplied · matplotlib/matplotlib@250e840 · GitHub
[go: up one dir, main page]

Skip to content

Commit 250e840

Browse files
committed
FIX: continue to bail tight layout if reect supplied
1 parent 2834743 commit 250e840

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/tight_layout.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,8 @@ def get_tight_layout_figure(fig, axes_list, subplotspec_list, renderer,
361361
ax_bbox_list=ax_bbox_list,
362362
pad=pad, h_pad=h_pad, w_pad=w_pad)
363363

364-
if rect is not None:
364+
# kwargs can be none if tight_layout fails...
365+
if rect is not None and kwargs is not None:
365366
# if rect is given, the whole subplots area (including
366367
# labels) will fit into the rect instead of the
367368
# figure. Note that the rect argument of

0 commit comments

Comments
 (0)
0