Note
Go to the end to download the full example code
Figimage Demo#
This illustrates placing images directly in the figure, with no Axes objects.
import matplotlib.pyplot as plt
import numpy as np
fig = plt.figure()
Z = np.arange(10000).reshape((100, 100))
Z[:, 50:] = 1
im1 = fig.figimage(Z, xo=50, yo=0, origin='lower')
im2 = fig.figimage(Z, xo=100, yo=100, alpha=.8, origin='lower')
plt.show()

References
The use of the following functions, methods, classes and modules is shown in this example: