|
From: Jeff W. <js...@fa...> - 2012-02-19 22:39:21
|
On 2/19/12 1:18 PM, Jose Guzman wrote: > Dear matplotlib users, > > I am trying to plot a nxn symetric matrix containing zeros (in white) > and ones (in black). Quite simple, I guessed. For that I use imshow as > follows: > > >>> imshow(W, cmap=cm.binary) # W is a Numpy Array with shape (100,100) > > However, this does not work the way i would like (the ones appear very > blur). I would need the correct representation of a grid where the > possition 0,0 is simply the entry W[0,0] of my array. > > There should be an easy way to plot this matrix, bu I cannot figure it > out. > > Thanks for your help in advance. > > Jose Jose: I think you need to add interpolation='nearest' to get rid of the blurriness. -Jeff |