Version 3.0.2
matplotlib

Related Topics

Subplot ToolbarΒΆ

Matplotlib has a toolbar available for adjusting subplot spacing.

Traceback (most recent call last):
  File "/build/matplotlib-xz4j8t/matplotlib-3.1.2/examples/subplots_axes_and_figures/subplot_toolbar.py", line 1
    ===============
    ^
SyntaxError: invalid syntax
===============
Subplot Toolbar
===============

Matplotlib has a toolbar available for adjusting subplot spacing.
"""
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()

Keywords: matplotlib code example, codex, python plot, pyplot Gallery generated by Sphinx-Gallery