legend subplot matplotlib code example
Example 1: legend matplotlib
import matplotlib.pyplot as plt
#define x and ysin
plt.plot(x,ysin,label='sin(x)')
plt.legend()
plt.show()
Example 2: subplot matplotlib legend
ax1.legend("HHZ 1",loc="upper right")
ax2.legend("HHN",loc="upper right")
ax3.legend("HHE",loc="upper right")