Skip to content

Commit 0a99661

Browse files
committed
Merge subplot_toolbar example into subplots_adjust.
They seem close enough.
1 parent 4f2f4de commit 0a99661

File tree

2 files changed

+14
-33
lines changed

2 files changed

+14
-33
lines changed

examples/subplots_axes_and_figures/subplot_toolbar.py

Lines changed: 0 additions & 26 deletions
This file was deleted.
Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
"""
2-
===============
3-
Subplots Adjust
4-
===============
2+
=============================
3+
Subplots spacings and margins
4+
=============================
55
6-
Adjusting the spacing of margins and subplots using
7-
`~matplotlib.pyplot.subplots_adjust`.
6+
Adjusting the spacing of margins and subplots using `.pyplot.subplots_adjust`.
7+
8+
.. note::
9+
There is also a tool window to adjust the margins and spacings of displayed
10+
figures interactively. It can be opened via the toolbar or by calling
11+
`.pyplot.subplot_tool`.
12+
13+
.. redirect-from:: /gallery/subplots_axes_and_figures/subplot_toolbar
814
"""
915

1016
import matplotlib.pyplot as plt
@@ -14,11 +20,12 @@
1420
np.random.seed(19680801)
1521

1622
plt.subplot(211)
17-
plt.imshow(np.random.random((100, 100)), cmap=plt.cm.BuPu_r)
23+
plt.imshow(np.random.random((100, 100)))
1824
plt.subplot(212)
19-
plt.imshow(np.random.random((100, 100)), cmap=plt.cm.BuPu_r)
25+
plt.imshow(np.random.random((100, 100)))
2026

2127
plt.subplots_adjust(bottom=0.1, right=0.8, top=0.9)
2228
cax = plt.axes([0.85, 0.1, 0.075, 0.8])
2329
plt.colorbar(cax=cax)
30+
2431
plt.show()

0 commit comments

Comments
 (0)