You are reading an old version of the documentation (v2.0.2). For the latest version see


This Page

images_contours_and_fields example code: image_demo.pyΒΆ

(Source code, png, pdf)

Simple demo of the imshow function.
import matplotlib.pyplot as plt
import matplotlib.cbook as cbook

image_file = cbook.get_sample_data('ada.png')
image = plt.imread(image_file)

fig, ax = plt.subplots()
ax.axis('off')  # clear x- and y-axes

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