Figure.auto_layout¶
- Figure.auto_layout(renderer=None, resize=None, aspect=None, tight=None)[source]¶
Automatically adjust the figure size and subplot positions. This is triggered automatically whenever the figure is drawn.
- Parameters
renderer (
RendererBase
, optional) – The renderer. IfNone
a default renderer will be produced.resize (
bool
, optional) – IfFalse
, the current figure dimensions are fixed and automatic figure resizing is disabled. This is set toFalse
if the current backend is the interactive ipython notebook backend, which cannot handle automatic resizing. By default, the figure size may change unless bothfigwidth
andfigheight
orfigsize
were passed tosubplots
,set_size_inches
was called manually, or the figure was resized manually with an interactive backend.aspect (
bool
, optional) – Whether to update the figure size based on the reference subplot aspect ratio. By default, this isTrue
. This only has an effect if the aspect ratio is fixed (e.g., due to an image plot or geographic projection).tight (
bool
, optional) – Whether to update the figuer size and subplot positions according to a “tight layout”. By default, this takes on the value oftight
passed toFigure
. If nothing was passed, it isrc['subplots.tight']
=True
.