8000 Cleanup and move image_demo3.py · matplotlib/matplotlib@e9bfbb9 · GitHub
[go: up one dir, main page]

Skip to content

Commit e9bfbb9

Browse files
committed
Cleanup and move image_demo3.py
* Rename to imshow_demo * Add smaller version of lena image saved as a numpy binary so that use doesn't require PIL
1 parent 48fab58 commit e9bfbb9

File tree

3 files changed

+14
-21
lines changed

3 files changed

+14
-21
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"""
2+
Simple demo of the imshow function.
3+
"""
4+
import numpy as np
5+
import matplotlib.pyplot as plt
6+
import matplotlib.cbook as cbook
7+
8+
image_file = cbook.get_sample_data('lena.npy')
9+
image = np.load(image_file)
10+
11+
plt.imshow(image)
12+
plt.axis('off') # clear x- and y-axes
13+
plt.show()
14+

examples/pylab_examples/image_demo3.py

Lines changed: 0 additions & 21 deletions
This file was deleted.
192 KB
Binary file not shown.

0 commit comments

Comments
 (0)
0