私は多くの行を持つファイルin.txtを持っています。 1〜20列(未定義)です。数字が含まれています。matplotlib凡例ボックスの名前を変更するには?
私はこのコード伝説のすべての名称は、 "中"、私は "1" のような名前にしたい、 "2"、「3あるのではなく
y=np.loadtxt('in.txt')
t=np.arange(len(y))*1
plt.subplot(211)
plt.title(r'in')
plt.grid(1)
plt.plot(t,y, label = 'in')
plt.legend(borderpad = 0.1, labelspacing = 0.1)
plt.show()
It is what I have now (in this example I have 10 columns in file in.txt)
しかし、でグラフィックを描画(1からnまで、ここでnはin.txtファイルの列の数です)
THXたくさん。 2番目の変種はOKです。それは私が望むものだ – falazure