diff --git a/galleries/users_explain/axes/tight_layout_guide.py b/galleries/users_explain/axes/tight_layout_guide.py index dcffa7437b94..c0040ec1a8c8 100644 --- a/galleries/users_explain/axes/tight_layout_guide.py +++ b/galleries/users_explain/axes/tight_layout_guide.py @@ -9,15 +9,17 @@ How to use tight-layout to fit plots within your figure cleanly. +.. tip:: + + *tight_layout* was the first layout engine in Matplotlib. The more modern + and more capable :ref:`Constrained Layout ` should + typically be used instead. + *tight_layout* automatically adjusts subplot params so that the subplot(s) fits in to the figure area. This is an experimental feature and may not work for some cases. It only checks the extents of ticklabels, axis labels, and titles. -An alternative to *tight_layout* is :ref:`constrained_layout -`. - - Simple example ============== diff --git a/lib/matplotlib/layout_engine.py b/lib/matplotlib/layout_engine.py index 5a96745d0697..8a3276b53371 100644 --- a/lib/matplotlib/layout_engine.py +++ b/lib/matplotlib/layout_engine.py @@ -10,9 +10,14 @@ layout engine while the figure is being created. In particular, colorbars are made differently with different layout engines (for historical reasons). -Matplotlib supplies two layout engines, `.TightLayoutEngine` and -`.ConstrainedLayoutEngine`. Third parties can create their own layout engine -by subclassing `.LayoutEngine`. +Matplotlib has two built-in layout engines: + +- `.TightLayoutEngine` was the first layout engine added to Matplotlib. + See also :ref:`tight_layout_guide`. +- `.ConstrainedLayoutEngine` is more modern and generally gives better results. + See also :ref:`constrainedlayout_guide`. + +Third parties can create their own layout engine by subclassing `.LayoutEngine`. """ from contextlib import nullcontext pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy