Answers for "how to add legends to matplotlib"

0

add legends to y plots matplotlib

plt.plot(xs, y_1s, "-b", label="x^2")

plt.plot(xs, y_2s, "-g", label = "2x + 1")


plt.legend()
Posted by: Guest on October-13-2021

Code answers related to "how to add legends to matplotlib"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language