Skip to content

Commit

Permalink
Merge pull request #4871 from jenshnielsen/mepmri
Browse files Browse the repository at this point in the history
mep12 on mri_demo.py
  • Loading branch information
jenshnielsen committed Aug 6, 2015
2 parents 54bdd3e + 14683b8 commit d22f626
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions examples/pylab_examples/mri_demo.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
#!/usr/bin/env python

from __future__ import print_function
from pylab import *
import matplotlib.pyplot as plt
import matplotlib.cbook as cbook
import numpy as np
# data are 256x256 16 bit integers
dfile = cbook.get_sample_data('s1045.ima.gz')
im = np.fromstring(dfile.read(), np.uint16).astype(float)
im.shape = 256, 256

#imshow(im, ColormapJet(256))
imshow(im, cmap=cm.gray)
axis('off')
plt.imshow(im, cmap=plt.cm.gray)
plt.axis('off')

show()
plt.show()

0 comments on commit d22f626

Please sign in to comment.