Ever since upgrading matplotlib I get the following error whenever trying to create a legend:
/usr/lib/pymodules/python2.7/matplotlib/legend.py:610: UserWarn
Use the "label" keyword, like so:
pyplot.plot(x, y, label='x vs. y')
and then add the legend like so:
pyplot.legend()
The legend will retain line properties like thickness, colours, etc.