【发布时间】:2018-05-09 14:35:40
【问题描述】:
在matplotlib之前使用索引作为x轴,这是我想要的。
现在不行了,这是为什么呢?
Close Prediction
Date
2017-06-21 155.03 152.586975
2017-06-22 154.89 153.450424
2017-06-23 158.02 150.374527
2017-06-26 157.50 149.241684
2017-06-27 151.03 148.880630
代码
import matplotlib.pyplot as plt2
plt2.plot(joined['Prediction'], color='red', label='Prediction')
plt2.plot(joined['Close'], color='blue', label='Actual')
plt2.legend(loc='upper left')
plt2.show()
【问题讨论】:
-
参见this question 和其中的链接。
标签: python pandas matplotlib