Note
Click here to download the full example code
Subplot ToolbarΒΆ
Matplotlib has a toolbar available for adjusting subplot spacing.
import matplotlib.pyplot as plt
import numpy as np
# Fixing random state for reproducibility
np.random.seed(19680801)
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 1.018 seconds)
Keywords: matplotlib code example, codex, python plot, pyplot Gallery generated by Sphinx-Gallery