【发布时间】:2018-10-15 16:09:52
【问题描述】:
【问题讨论】:
标签: python matplotlib jupyter-notebook
【问题讨论】:
标签: python matplotlib jupyter-notebook
首先将调用的返回值保存到df.plot:
ax = df_6.plot(...)
现在您有了对绘图的引用(ax 是一个 matplotlib Axis 对象,代表您刚刚制作的绘图)。然后,您可以像这样在图中添加一条水平线:
ax.axhline(y=5, color='red')
【讨论】: