orderの役割がわかりません。
import scipy as sp import matplotlib.pyplot as plt data = sp.genfromtxt("data/web_traffic.tsv",delimiter="\t") x = data[:,0] y = data[:,1] x = x[~sp.isnan(y)] y = y[~sp.isnan(y)] fp1,residuals,rank,sv,rcond = sp.polyfit(x,y,1,full=True) f1 = sp.poly1d(fp1) plt.autoscale(tight=True) fx = sp.linspace(0,x[-1],1000) plt.plot(fx,f1(fx),linewidth=4) plt.legend(["d=%i"%f1.order],loc="upper left") plt.scatter(x,y) plt.title("Web traffic over the last month") plt.xlabel("Time") plt.ylabel("Hits/hour") plt.xticks([w*7*24 for w in range(10)], ['week %i'%w for w in range(10)]) plt.grid() plt.show()
というコードがあり、
plt.legend(["d=%i"%f1.order],loc="upper left")
の部分のorder がどのような役割なのかわかりません。
どのような役割なのでしょうか?
またこのorderに名前はついているのでしょうか?
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。