You are reading an old version of the documentation (v2.1.1). For the latest version see https://matplotlib.org/stable/gallery/subplots_axes_and_figures/subplot_toolbar.html
matplotlib
Fork me on GitHub


Travis-CI:

Related Topics

This Page

Subplot ToolbarΒΆ

Matplotlib has a toolbar available for adjusting suplot spacing.

  • ../../_images/sphx_glr_subplot_toolbar_001.png
  • ../../_images/sphx_glr_subplot_toolbar_002.png
import matplotlib.pyplot as plt
import numpy as np

fig, axs = plt.subplots(2, 2)

axs[0, 0].imshow(np.random.random((100, 100)))

axs[0, 1].imshow(np.random.random((100, 100)))

axs[1, 0].imshow(np.random.random((100, 100)))

axs[1, 1].imshow(np.random.random((100, 100)))

plt.subplot_tool()
plt.show()

Total running time of the script: ( 0 minutes 0.219 seconds)

Gallery generated by Sphinx-Gallery