假设 DataFrame df
具有三个系列:S1
、S2
和 S3
。
我想画
S1
具有蓝色和连续线,S2
,蓝色和虚线,S3
,绿色,连续线。
我可以调用Series.plot()
三次,但是如果我想使用DataFrame.plot()
怎么办?
换句话说,我想使用方法 df[[S1,S2,S3]].plot()
但我不知道要传递给方法 plot()< 的参数
。
到目前为止,我只发现我可以传递 matplotlib
colormap
但这似乎并不能解决我的问题。
最佳答案
关于python - Pandas 情节 : how to plot some columns of a dataframe with the same color but different style and some cols with different color and different style?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71843977/