[SciPy-user] Stupid plot question

Alan G Isaac aisaac@american....
Thu Nov 20 12:48:57 CST 2008


Steve Lianoglou wrote:
> import random
> m = array([random.gauss(0,1) for i in range(100)]).reshape((10,10))
> m[m<0] = -1
> m[m!=-1]=1
> x,y = where(m==-1)
> plot(x,y,'bo')
> x,y = where(m==1)
> plot(x,y,'ro')


This is nice, 'tho I'd probably
prefer to add 0.5 to x and y.

An alternative is `matshow(m)`.

Alan Isaac


More information about the SciPy-user mailing list