我刚刚画了两个系列,我想,对于x轴上的每个值,用一条线连接它们,并写下它们的距离(我已经计算过)。我已经在为画一条线而挣扎:没有
plt.plot([result[0][:no_obs], result[1][:no_obs]], 'ro-')
在代码中,结果作为第一张图片。然而,有了它,结果就成了第二幅图
df = pd.read_csv(csv, header=None)
no_obs = len(df[0]);
rho1 = 0.2
rho2 = 0.4
plt.plot(result[0][:no_obs], 'go')
plt.plot(result[1][:no_obs], 'b*')
plt.plot([result[0][:no_obs], result[1][:no_obs]], 'ro-')
plt.title("rho1=%s - rho2=%s" % (str(rho1), str(rho2)))
plt.show()
这是我的数据集(y值)
目前没有回答
相关问题 更多 >
编程相关推荐