[Matplotlib-users] the problem in pylab_examples example code: image_demo2.py

2010-03-23 Thread yogesh karpate
The 1st code snippet of image_demo2.py is as follows #!/usr/bin/env python from pylab import * w, h = 512, 512 s = file('../data/ct.raw', 'rb').read() A = fromstring(s, uint16).astype(float) A *= 1.0/max(A) A.shape = w, h I replaced s = file('../data/ct.raw', 'rb').read() with s =

Re: [Matplotlib-users] the problem in pylab_examples example code: image_demo2.py

2010-03-23 Thread Jae-Joon Lee
The example assumes that the file is a dump of uin16 512x512 array. So, no doubt that it won't work with a png file. See http://matplotlib.sourceforge.net/users/image_tutorial.html -JJ On Tue, Mar 23, 2010 at 9:41 AM, yogesh karpate yogeshkarp...@gmail.com wrote: The 1st code snippet of