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

Travis-CI:

This Page

pylab_examples example code: figimage_demo.pyΒΆ

(Source code, png, pdf)

../../_images/figimage_demo.png
"""
This illustrates placing images directly in the figure, with no axes.

"""
import numpy as np
import matplotlib
import matplotlib.cm as cm
import matplotlib.pyplot as plt


fig = plt.figure()
Z = np.arange(10000.0)
Z.shape = 100, 100
Z[:, 50:] = 1.

im1 = plt.figimage(Z, xo=50, yo=0, origin='lower')
im2 = plt.figimage(Z, xo=100, yo=100, alpha=.8, origin='lower')

plt.show()

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