Creating labels where line appears in matplotlib figure

前端 未结 2 1237
眼角桃花
眼角桃花 2021-02-01 00:37

I have a figure created in matplotlib (time-series data) over which are a series of

matplotlib.pyplot.axvline

lines. I would like to create la

2条回答
  •  不要未来只要你来
    2021-02-01 01:11

    You can use something like

    plt.axvline(10)
    plt.text(10.1,0,'blah',rotation=90)
    

    you might have to play around with the x and y value in text to get it to align properly. You can find the more complete documentation here.

提交回复
热议问题