You are reading an old version of the documentation (v1.5.1). For the latest version see https://matplotlib.org/stable/

We're updating the default styles for Matplotlib 2.0

Learn what to expect in the new updates

matplotlib

Travis-CI:

This Page

pylab_examples example code: subplot_toolbar.pyΒΆ

(Source code)

import matplotlib.pyplot as plt
import numpy.random as rnd

fig = plt.figure()
plt.subplot(221)
plt.imshow(rnd.random((100, 100)))
plt.subplot(222)
plt.imshow(rnd.random((100, 100)))
plt.subplot(223)
plt.imshow(rnd.random((100, 100)))
plt.subplot(224)
plt.imshow(rnd.random((100, 100)))

plt.subplot_tool()
plt.show()

Keywords: python, matplotlib, pylab, example, codex (see Search examples)