如何绘制带有回归线和围绕回归线的标准偏差的已记录散点图?即使在对小数位设置了限制之后,该行似乎也根本没有出现。
plt.style.use('ggplot')
x = np.log(ld_country["confirmed"])
y = np.log(ld_country["deaths"])
a = np.log(ld_country.loc['Singapore','confirmed'])
b = np.log(ld_country.loc['Singapore','deaths'])
b, m = polyfit(x, y, 1)
plt.plot(x, y, '.',c='red')
plt.scatter(x,y,c='red')
plt.scatter(a,b,s=200,marker='*',c='blue')
plt.legend(["Rest of the World","Singapore"])
plt.title("Mortality Rate (Logged)")
plt.xlabel("Log Total Cases")
plt.ylabel("Log Total Deaths")