When I execute the following code, it doesn\'t produce a plot with a label.
import matplotlib.pyplot as plt import numpy as np x = np.arange(1, 5) plt.pl
You forgot to display the legend:
... plt.legend(loc='best') plt.show()