It has been discused in other posts (e.g., here) how to reorder items in a legend since sometimes they don't appear in the order of creation. For example:
plt.errorbar(1, 1, .2, label='label 1')
plt.plot(1, 2, '.', label='label 2')
plt.legend()
plt.show()
So how could be possible to tell matplotlib to display all legends of the script/notebook automatically in the order labels were defined without having to reorder manually?