8
を使用してプロットは、特定の瞬間に含まれている私は、この中に「スパン1」のような水平方向のテキストを追加することができれば、このようなハイライト注釈私はプロットを作ることに、これを使用していますmatplotlibの
plt.axis('normal')
plt.axvspan(76, 76, facecolor='g', alpha=1)
plt.plot(ts.e1, 'r',linewidth=1.5)
plt.ylabel("Anger",fontsize=14,color='blue')
plt.ylim(ymax=0.04)
plt.xlim(xmax=122)
plt.grid(True)
plt.title("Anger - Real Events", fontsize=20,color='black')
plt.xlabel('minutes', fontsize=14, color='b')
plt.show()
として何かが任意のアイデアがあります:
plt.axvspan(76, 76, facecolor='g', alpha=1)
または「line1」というテキストを使用して、このスパンに表示する矢印がありますか?ここで
私は矢のスタイル(arrowstyle)を作ることができます= " - > strateを表示するように –
矢印で注釈を付けるためのドキュメントを見てみましょう:?http://matplotlib.org/users/ annotations_guide.html#annotating-with-arrow。たくさんの使用例がありますが、必要なものは間違いなく見つかります。 – alecxe
あなたは 'text'か' annotate'を使うべきですか? – endolith