I have a code that looks like this:
import matplotlib.pyplot as plt
x1 = [1, 2, 3]
y1 = [1, 2, 3]
x2 = [1, 2, 3]
y2 = [53, 2, 3]
fig = plt.figure()
ax = fig.add_subplot(111)
ax.semilogx(x1, y1, marker='o', label='Phase Envelope')
ax.semilogx(x2, y2, marker=',', label='Isotherm, 200 C')
plt.show()
I want to add legend to each line, but for some reason label = '...' argument does not work. I thought this was the code that adds legend. What should I do?