error at http://matplotlib.sourceforge.net/matplotlib.pylab.html ?

figlegend(handles, labels, loc, **kwargs)
legend( (line1, line2, line3),

should that be

figlegend( (line1, line2, line3),

···

?
Keith