File: image_demo.py

package info (click to toggle)
ipe-tools 20150406-3
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 532 kB
  • ctags: 618
  • sloc: cpp: 2,021; python: 1,525; ansic: 1,053; makefile: 72; sh: 11
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