[Numpy-discussion] display numpy array as image

Angus McMorland amcmorl@gmail....
Thu Nov 29 17:08:00 CST 2007


On 30/11/2007, Zachary Pincus <zpincus@stanford.edu> wrote:
> Hello all,
>
> I'm curious if people have experience with / preferences for how to
> display a numpy array onscreen as an image.

I'm not sure if you're after anything specific, but a very convenient
way to show 2-D arrays on screen is matplotlib (mpl), which is the
recommended graphical interface to numpy. With the pylab interface to
mpl, the command is as simple as
>>>pylab.imshow(arr)
or
>>>pylab.matshow(arr)
for slightly different axis behaviour.

Angus.
-- 
AJC McMorland, PhD Student
Physiology, University of Auckland


More information about the Numpy-discussion mailing list