【发布时间】:2020-08-06 12:18:13
【问题描述】:
我想从 pandas 数据框中绘制折线图,但如下图所示,我的目标是在图表的背景中绘制不同的颜色。
这是我绘制折线图的方式。
ax = df.plot(kind='line')
plt.legend(ncol=6, bbox_to_anchor=(1.04,1))
plt.savefig("output.png", bbox_inches="tight")
plt.show()
【问题讨论】:
标签: python python-3.x pandas matplotlib