liu lily
2015-03-11 12:56:49 UTC
Hi, all:
I have two legends, as below, I find that I can't drag the first legend,
what is the problem? how to deal with it? thanks!
import matplotlib.pyplot as plt
fig1, ax1 = plt.subplots()
ax2 = ax1.twinx()
ax1.plot([1,2,3],[0.1,0.82,0.3],'y*', label="one")
ax2.plot([1,2,3],[5,6,7],'ro', label="two")
leg1 = ax1.legend()
leg2 = ax2.legend()
leg1.draggable(state=True)
leg2.draggable(state=True)
plt.show()
I have two legends, as below, I find that I can't drag the first legend,
what is the problem? how to deal with it? thanks!
import matplotlib.pyplot as plt
fig1, ax1 = plt.subplots()
ax2 = ax1.twinx()
ax1.plot([1,2,3],[0.1,0.82,0.3],'y*', label="one")
ax2.plot([1,2,3],[5,6,7],'ro', label="two")
leg1 = ax1.legend()
leg2 = ax2.legend()
leg1.draggable(state=True)
leg2.draggable(state=True)
plt.show()