Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d385b2c

Browse filesBrowse files
authored
Merge pull request #20507 from anntzer/st
Merge subplot_toolbar example into subplots_adjust.
2 parents 4f2f4de + 0a99661 commit d385b2c
Copy full SHA for d385b2c

File tree

Expand file treeCollapse file tree

2 files changed

+14
-33
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+14
-33
lines changed

‎examples/subplots_axes_and_figures/subplot_toolbar.py

Copy file name to clipboardExpand all lines: examples/subplots_axes_and_figures/subplot_toolbar.py
-26Lines changed: 0 additions & 26 deletions
This file was deleted.
+14-7Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.