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

Skip to content

Commit a687aaf

Browse files
committed
DOC: document return from get_tight_layout_figure
1 parent 5919ec8 commit a687aaf

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

doc/api/api_changes.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ API Changes for 3.0.1
3838

3939
`.tight_layout.auto_adjust_subplotpars` can return ``None`` now if the new
4040
subplotparams will collapse axes to zero width or height. This prevents
41-
``tight_layout`` from being executed.
41+
``tight_layout`` from being executed. Similarly
42+
`.tight_layout.get_tight_layout_figure` will return None.
4243

4344
API Changes for 3.0.0
4445
=====================

lib/matplotlib/tight_layout.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,13 @@ def get_tight_layout_figure(fig, axes_list, subplotspec_list, renderer,
290290
(left, bottom, right, top) rectangle in normalized figure coordinates
291291
that the whole subplots area (including labels) will fit into.
292292
Defaults to using the entire figure.
293+
294+
Returns
295+
-------
296+
subplotspec or None
297+
subplotspec kwargs to be passed to `.Figure.subplots_adjust` or
298+
None if tight_layout could not be accomplished.
299+
293300
"""
294301

295302
subplot_list = []

0 commit comments

Comments
 (0)