line4 = Line2D(list(range(10)), list(range(10)), marker='o', color='dodgerblue')
plt.legend((line1, line2, line3, line4), ('line1', 'line2', 'line3',
    'line4'), numpoints=1, loc=2)
Putting text in top left corner of matplotlib plot