legend matplotlib twinx code example
Example 1: legend matplotlib twinx
lns = lns1+lns2+lns3
labs = [l.get_label() for l in lns]
ax.legend(lns, labs, loc=0)
Example 2: legend matplotlib twinx
lns = lns1+lns2+lns3
labs = [l.get_label() for l in lns]
ax.legend(lns, labs, loc=0)