Skip to content

Commit d22f626

Browse files
committed
Merge pull request #4871 from jenshnielsen/mepmri
mep12 on mri_demo.py
2 parents 54bdd3e + 14683b8 commit d22f626

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

examples/pylab_examples/mri_demo.py

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
#!/usr/bin/env python
2-
31
from __future__ import print_function
4-
from pylab import *
2+
import matplotlib.pyplot as plt
53
import matplotlib.cbook as cbook
4+
import numpy as np
65
# data are 256x256 16 bit integers
76
dfile = cbook.get_sample_data('s1045.ima.gz')
87
im = np.fromstring(dfile.read(), np.uint16).astype(float)
98
im.shape = 256, 256
109

11-
#imshow(im, ColormapJet(256))
12-
imshow(im, cmap=cm.gray)
13-
axis('off')
10+
plt.imshow(im, cmap=plt.cm.gray)
11+
plt.axis('off')
1412

15-
show()
13+
plt.show()

0 commit comments

Comments
 (0)