@@ -740,13 +740,38 @@ def figure(num=None, # autoincrement if None, else integer from 1-N
740
740
clear : bool, default: False
741
741
If True and the figure already exists, then it is cleared.
742
742
743
- layout : {'constrained', 'tight', 'compressed' , \
744
- `.LayoutEngine`, None}, default: None
743
+ layout : {'constrained', 'compressed', ' tight', 'none', `.LayoutEngine`, None} , \
744
+ default: None
745
745
The layout mechanism for positioning of plot elements to avoid
746
746
overlapping Axes decorations (labels, ticks, etc). Note that layout
747
- managers can measurably slow down figure display. Defaults to *None*
748
- (but see the documentation of the `.Figure` constructor regarding the
749
- interaction with rcParams).
747
+ managers can measurably slow down figure display.
748
+
749
+ - 'constrained': The constrained layout solver adjusts axes sizes
750
+ to avoid overlapping axes decorations. Can handle complex plot
751
+ layouts and colorbars, and is thus recommended.
752
+
753
+ See :doc:`/tutorials/intermediate/constrainedlayout_guide`
754
+ for examples.
755
+
756
+ - 'compressed': uses the same algorithm as 'constrained', but
757
+ removes extra space between fixed-aspect-ratio Axes. Best for
758
+ simple grids of axes.
759
+
760
+ - 'tight': Use the tight layout mechanism. This is a relatively
761
+ simple algorithm that adjusts the subplot parameters so that
762
+ decorations do not overlap. See `.Figure.set_tight_layout` for
763
+ further details.
764
+
765
+ - 'none': Do not use a layout engine.
766
+
767
+ - A `.LayoutEngine` instance. Builtin layout classes are
768
+ `.ConstrainedLayoutEngine` and `.TightLayoutEngine`, more easily
769
+ accessible by 'constrained' and 'tight'. Passing an instance
770
+ allows third parties to provide their own layout engine.
771
+
772
+ If not given, fall back to using the parameters *tight_layout* and
773
+ *constrained_layout*, including their config defaults
774
+ :rc:`figure.autolayout` and :rc:`figure.constrained_layout.use`.
750
775
751
776
**kwargs
752
777
Additional keyword arguments are passed to the `.Figure` constructor.
0 commit comments