【发布时间】:2019-02-14 20:56:48
【问题描述】:
enter image description here我的情节需要一个箭头,我试图插入但它不会显示。我进行了研究,但找不到我做错了什么。
ax_google = df_stocks['GOOG'].plot(linewidth=5, color= "k", figsize=(9, 6))
ax_google.set_title("GOOGLE prices development", size=16, weight='bold')
ax_google.set_xlabel('Date')
ax_google.set_ylabel("Index")
ax_google.legend(['GOOG'])
ax_google.set_ylim(0,400)
ax_google.set_xlim('2008-01-01', '2010-01-01');
arrow = {'facecolor':'black', 'width':2, 'shrink':0.05}
ax.annotate('Bankruptcy of Lehman Brothers', xy=('2008-09-15',245), xytext=('2009-06-06',325), arrowprops=arrow);
【问题讨论】:
-
你能包括你得到的情节并显示你想要箭头的位置吗?
标签: python pandas matplotlib plot