@@ -51,6 +51,11 @@ def example_plot(ax, fontsize=12):
51
51
plt .tight_layout ()
52
52
53
53
###############################################################################
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
+ #
54
59
# When you have multiple subplots, often you see labels of different
55
60
# axes overlapping each other.
56
61
@@ -141,7 +146,7 @@ def example_plot(ax, fontsize=12):
141
146
142
147
###############################################################################
143
148
# Caveats
144
- # -------
149
+ # =======
145
150
#
146
151
# * :func:`~matplotlib.pyplot.tight_layout` only considers ticklabels, axis
147
152
# labels, and titles. Thus, other artists may be clipped and also may
@@ -157,7 +162,7 @@ def example_plot(ax, fontsize=12):
157
162
# recommended.
158
163
#
159
164
# Use with GridSpec
160
- # -----------------
165
+ # =================
161
166
#
162
167
# GridSpec has its own :func:`~matplotlib.gridspec.GridSpec.tight_layout` method
163
168
# (the pyplot api :func:`~matplotlib.pyplot.tight_layout` also works).
@@ -275,7 +280,7 @@ def example_plot(ax, fontsize=12):
275
280
276
281
###############################################################################
277
282
# Use with AxesGrid1
278
- # ------------------
283
+ # ==================
279
284
#
280
285
# While limited, the axes_grid1 toolkit is also supported.
281
286
@@ -295,7 +300,7 @@ def example_plot(ax, fontsize=12):
295
300
296
301
###############################################################################
297
302
# Colorbar
298
- # --------
303
+ # ========
299
304
#
300
305
# If you create a colorbar with the :func:`~matplotlib.pyplot.colorbar`
301
306
# command, the created colorbar is an instance of Axes, *not* Subplot, so
0 commit comments