Sophie

Sophie

distrib > Fedora > 13 > i386 > media > os > by-pkgid > 04ac4d8ac4c188d8cf0bb8b651b15684 > files > 712

python-matplotlib-0.99.1.2-3.fc13.i686.rpm

#!/usr/bin/env python
from pylab import *

N=1000

props = dict( alpha=0.5, edgecolors='none' )

handles = []
colours = ['red', 'green', 'blue', 'magenta', 'cyan', 'yellow']
colours = ['red', 'green', 'blue']
for colour in colours:
    x, y = rand(2,N)
    s = 400.0 * rand(N)
    handles.append(scatter(x, y, c=colour, s=s, **props))

legend(handles, colours)
grid(True)

show()