且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在matplotlib图中线出现的地方创建标签

更新时间:2022-11-07 21:54:45

您可以使用

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

您可能需要使用text中的x和y值来使其正确对齐. 您可以在此处找到完整的文档.

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.