【发布时间】:2020-07-22 17:59:35
【问题描述】:
所以,我有一个折线图,显示 2010 年到 2020 年的随机销售数据。但是,我想添加一条垂直线或一些视觉资源来指示 2014 年发生的重要事情。我怎样才能在 Python 中做到这一点?任何图书馆都可以!
【问题讨论】:
-
您能否提供更多有关您正在使用的 python 图形库的信息?它只是matplotlib吗?
-
查看 matplotlib 的
vline -
或者你可以使用matplotlib的
plt.annotate():matplotlib.org/api/_as_gen/matplotlib.pyplot.annotate.html
标签: python pandas numpy matplotlib charts