plot labels python code example
Example 1: position of legend matplotlib
plt.legend(loc='upper right')
Example 2: python display name plot
plt.plot(x, y, label='First Line')
plt.plot(x2, y2, label='Second Line')
plt.legend(loc='upper right')
plt.plot(x, y, label='First Line')
plt.plot(x2, y2, label='Second Line')