[英]Use seaborn to make time series plot instead of pandas.dataframe.plot
I have the foll.我有办法。 dataframe:
数据框:
df
A R
0 0.000000 0.000000
1 176.069152 544.511391
2 352.338584 965.989678
3 528.824516 1387.844940
4 705.510351 1809.956118
I can plot it like this:我可以这样绘制:
df.plot()
How can I do this in seaborn?我怎样才能在 seaborn 中做到这一点? I am trying this, but it does not work.
我正在尝试这个,但它不起作用。 Please note that I do not want to explicitly specify column names, since the number of columns is much larger than this toy example.
请注意,我不想明确指定列名,因为列数比这个玩具示例大得多。
import seaborn as sns
sns.tsplot(data=df, time=df.index, value=df)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.