Skip to content

Commit 203ad87

Browse files
authored
Merge pull request #16202 from anntzer/use_gridspec
Remove outdated statement in tight_layout guide.
2 parents ec83125 + 37bae0b commit 203ad87

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tutorials/intermediate/tight_layout_guide.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,15 +336,15 @@ def example_plot(ax, fontsize=12):
336336
# ========
337337
#
338338
# If you create a colorbar with `.Figure.colorbar`, the created colorbar is
339-
# an instance of Axes, *not* Subplot, so tight_layout does not work. With
340-
# Matplotlib v1.1, you may create a colorbar as a subplot using the gridspec.
339+
# drawn in a Subplot as long as the parent axes is also a Subplot, so
340+
# `.Figure.tight_layout` will work.
341341

342342
plt.close('all')
343343
arr = np.arange(100).reshape((10, 10))
344344
fig = plt.figure(figsize=(4, 4))
345345
im = plt.imshow(arr, interpolation="none")
346346

347-
plt.colorbar(im, use_gridspec=True)
347+
plt.colorbar(im)
348348

349349
plt.tight_layout()
350350

0 commit comments

Comments
 (0)