@@ -51,6 +51,11 @@ def example_plot(ax, fontsize=12):
5151plt .tight_layout ()
5252
5353###############################################################################
54+ # Note that :func:`matplotlib.pyplot.tight_layout` will only adjust the
55+ # subplot params when it is called. In order to perform this adjustment each
56+ # time the figure is redrawn, you can call ``fig.set_tight_layout(True)``, or,
57+ # equivalently, set the ``figure.autolayout`` rcParam to ``True``.
58+ #
5459# When you have multiple subplots, often you see labels of different
5560# axes overlapping each other.
5661
@@ -141,7 +146,7 @@ def example_plot(ax, fontsize=12):
141146
142147###############################################################################
143148# Caveats
144- # -------
149+ # =======
145150#
146151# * :func:`~matplotlib.pyplot.tight_layout` only considers ticklabels, axis
147152# labels, and titles. Thus, other artists may be clipped and also may
@@ -157,7 +162,7 @@ def example_plot(ax, fontsize=12):
157162# recommended.
158163#
159164# Use with GridSpec
160- # -----------------
165+ # =================
161166#
162167# GridSpec has its own :func:`~matplotlib.gridspec.GridSpec.tight_layout` method
163168# (the pyplot api :func:`~matplotlib.pyplot.tight_layout` also works).
@@ -275,7 +280,7 @@ def example_plot(ax, fontsize=12):
275280
276281###############################################################################
277282# Use with AxesGrid1
278- # ------------------
283+ # ==================
279284#
280285# While limited, the axes_grid1 toolkit is also supported.
281286
@@ -295,7 +300,7 @@ def example_plot(ax, fontsize=12):
295300
296301###############################################################################
297302# Colorbar
298- # --------
303+ # ========
299304#
300305# If you create a colorbar with the :func:`~matplotlib.pyplot.colorbar`
301306# command, the created colorbar is an instance of Axes, *not* Subplot, so
0 commit comments