EG 1
import numpy as np import matplotlib.pyplot as plt y = np.arange(1, 5) plt.plot(y, y + 2, label='Normal') plt.plot(y, y + 3, label='Fast') plt.plot(y, y + 4, label='Faster') plt.legend() # hasn't this , can't show plt.legend(['2','3','4']) # repeat set , will repace plt.show()