Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 54bdd3e commit 14683b8Copy full SHA for 14683b8
1 file changed
examples/pylab_examples/mri_demo.py
@@ -1,15 +1,13 @@
1
-#!/usr/bin/env python
2
-
3
from __future__ import print_function
4
-from pylab import *
+import matplotlib.pyplot as plt
5
import matplotlib.cbook as cbook
+import numpy as np
6
# data are 256x256 16 bit integers
7
dfile = cbook.get_sample_data('s1045.ima.gz')
8
im = np.fromstring(dfile.read(), np.uint16).astype(float)
9
im.shape = 256, 256
10
11
-#imshow(im, ColormapJet(256))
12
-imshow(im, cmap=cm.gray)
13
-axis('off')
+plt.imshow(im, cmap=plt.cm.gray)
+plt.axis('off')
14
15
-show()
+plt.show()
0 commit comments