使用数据帧
df = pd.DataFrame({
"date" : ["2018-01-01", "2018-01-02", "2018-01-03", "2018-01-04"],
"column1" : [555,525,532,585],
"column2" : [50,48,49,51]
})
我们可以用seaborn
来作图,也可以用sns.tsplot(data=df.column1, color="g")
来作图。
我们如何在seaborn中用两个y轴绘制两个时间序列?
Tags:
我建议使用普通的线图。您可以通过
ax.twinx()
获得双轴。由于
seaborn
是建立在matplotlib
之上的,您可以使用它的能力:相关问题 更多 >
编程相关推荐