.. _pylab_examples-mri_demo:

pylab_examples example code: mri_demo.py
========================================



.. plot:: /tmp/buildd/matplotlib-0.99.3/doc/mpl_examples/pylab_examples/mri_demo.py

::

    #!/usr/bin/env python
    from pylab import *
    
    # data are 256x256 16 bit integers
    dfile = '../data/s1045.ima'
    im = fromstring(file(dfile, 'rb').read(), uint16).astype(float)
    im.shape = 256, 256
    
    #imshow(im, ColormapJet(256))
    imshow(im, cmap=cm.jet)
    axis('off')
    
    show()
    

Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)