diff --git a/tutorials/intermediate/tight_layout_guide.py b/tutorials/intermediate/tight_layout_guide.py index 613ff4423ec5..b3cbb0861113 100644 --- a/tutorials/intermediate/tight_layout_guide.py +++ b/tutorials/intermediate/tight_layout_guide.py @@ -51,6 +51,11 @@ def example_plot(ax, fontsize=12): plt.tight_layout() ############################################################################### +# Note that :func:`matplotlib.pyplot.tight_layout` will only adjust the +# subplot params when it is called. In order to perform this adjustment each +# time the figure is redrawn, you can call ``fig.set_tight_layout(True)``, or, +# equivalently, set the ``figure.autolayout`` rcParam to ``True``. +# # When you have multiple subplots, often you see labels of different # axes overlapping each other. @@ -141,7 +146,7 @@ def example_plot(ax, fontsize=12): ############################################################################### # Caveats -# ------- +# ======= # # * :func:`~matplotlib.pyplot.tight_layout` only considers ticklabels, axis # labels, and titles. Thus, other artists may be clipped and also may @@ -157,7 +162,7 @@ def example_plot(ax, fontsize=12): # recommended. # # Use with GridSpec -# ----------------- +# ================= # # GridSpec has its own :func:`~matplotlib.gridspec.GridSpec.tight_layout` method # (the pyplot api :func:`~matplotlib.pyplot.tight_layout` also works). @@ -275,7 +280,7 @@ def example_plot(ax, fontsize=12): ############################################################################### # Use with AxesGrid1 -# ------------------ +# ================== # # While limited, the axes_grid1 toolkit is also supported. @@ -295,7 +300,7 @@ def example_plot(ax, fontsize=12): ############################################################################### # Colorbar -# -------- +# ======== # # If you create a colorbar with the :func:`~matplotlib.pyplot.colorbar` # command, the created colorbar is an instance of Axes, *not* Subplot, so 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