Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions tutorials/intermediate/tight_layout_guide.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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
Expand All @@ -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).
Expand Down Expand Up @@ -275,7 +280,7 @@ def example_plot(ax, fontsize=12):

###############################################################################
# Use with AxesGrid1
# ------------------
# ==================
#
# While limited, the axes_grid1 toolkit is also supported.

Expand All @@ -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
Expand Down