[SciPy-user] Stupid plot question

Ryan James rgjames@ucdavis....
Thu Nov 20 11:56:36 CST 2008

On Thu, 2008-11-20 at 18:02 +0100, Marco wrote:
> I have a 2d matrix with some values in it: basically they are just
> ones or minus ones, and I want to plot them putting a red "square" (or
> "ball" or "something") on screen (on a grid) if the value of that
> matrix element is one and a blue "something" if it is minus one.

There's also:

M = array([randint(0, 2) for i in xrange(100)]).reshape((10,10))
M = 2*M - 1


More information about the SciPy-user mailing list