python-matplotlib-annotate_添加图形内容细节指向
作者:互联网
import matplotlib.pyplot as plt
import numpy as np
x=np.linspace(0.05,10,1000)
y=np.sin(x)
plt.plot(x,y,ls="-.",lw=2.3,color="black",label="sin()")
plt.annotate("maxvalues",xy=(7.8,1.0),xytext=(4.5,0.9),weight="bold",color="black",arrowprops=dict(arrowstyle="->",connectionstyle="arc3",color="r"))
plt.legend()
plt.show()
标签:plt,python,matplotlib,annotate,color,black,np,sin 来源: https://www.cnblogs.com/shunguo/p/11397043.html