Set the layout engine for this figure.
LayoutEngine, None}
ConstrainedLayoutEngine
ConstrainedLayoutEngine, but with a correction that attempts to make a good layout for fixed-aspect ratio Axes.TightLayoutEngine
If a LayoutEngine instance, that instance will be used.
If None, the behavior is controlled by rcParams["figure.autolayout"] (default: False) (which if True behaves as if 'tight' was passed) and rcParams["figure.constrained_layout.use"] (default: False) (which if True behaves as if 'constrained' was passed). If both are True, rcParams["figure.autolayout"] (default: False) takes priority.
Users and libraries can define their own layout engines and pass the instance directly as well.
The keyword arguments are passed to the layout engine to set things like padding and margin sizes. Only used if layout is a string.
matplotlib.figure.Figure.set_layout_engine
© 2012–2023 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/stable/api/_as_gen/matplotlib.figure.Figure.set_layout_engine.html