File: image_demo.py

package info (click to toggle)
ipe-tools 1%3A7.2.29.1-2
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 880 kB
  • sloc: cpp: 2,719; python: 2,122; ansic: 1,052; sh: 224; makefile: 94; xml: 39
file content (11 lines) | stat: -rw-r--r-- 268 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
"""
Simple demo of the imshow function.
"""
import matplotlib.pyplot as plt
import matplotlib.cbook as cbook

datafile = cbook.get_sample_data('ada.png', asfileobj=False)
image = plt.imread(datafile)

plt.imshow(image)
plt.axis('off') # clear x- and y-axes