【发布时间】:2018-05-08 18:39:48
【问题描述】:
假设我有一个这样的系列:
testdf = pd.Series([3, 4, 2, 5, 1, 6, 10])
绘图时,结果如下:
testdf.plot()
我想用蓝色(默认)绘制前 4 个值的线,用红色绘制线的其余部分。我该怎么做?
【问题讨论】:
标签: python python-3.x pandas matplotlib plot
假设我有一个这样的系列:
testdf = pd.Series([3, 4, 2, 5, 1, 6, 10])
绘图时,结果如下:
testdf.plot()
我想用蓝色(默认)绘制前 4 个值的线,用红色绘制线的其余部分。我该怎么做?
【问题讨论】:
标签: python python-3.x pandas matplotlib plot