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,c="c",label="plot figure")
plt.legend()
plt.axhline(y=0.0,c="r",ls="--",lw=2)
plt.axvline(x=4.0,c="r",ls="--",lw=2)
plt.show()
Chapter01.06::为图像添加水平或者垂直参考线
最新推荐文章于 2023-11-07 11:39:56 发布