2
私はmatplotlibを使ってプロットを作成していますが、それは1つの問題を抱えているようです。 は私が3つのサブプロットを描き、私は伝説のインスタンスを使用しているが、それは唯一の最後のサブプロットにlegenを示し、それらのすべてsubplot matplotlibの共通の凡例
fig, (ax, ax2, ax3) = plt.subplots(3, 1, sharex=True)
ax.plot(FRAME1['T1'],FRAME1['Num'], marker = 'o', label='1')
ax2.plot(FRAME3['T1'],FRAME3['Num'], marker = 'o', label='2',color='r')
ax2.plot(FRAME4['T1'],FRAME4['Num'], marker = 'o', label='3',color='turquoise')
ax3.plot(FRAME2['T1'],FRAME2['Num'], marker = 'o', label='4',color='g')
ax.set_ylim(-118, -116.5)
ax3.set_ylim(-136, -135)
plt.legend((ax,ax2,ax3),loc="upper left", bbox_to_anchor=[0, 1],
ncol=2, shadow=True, title="Legend", fancybox=True)
ための共通の凡例を取得したいです。
ありがとうございました!それは多くの助けになりました! – Monica