![](https://img-blog.csdnimg.cn/20190918140129601.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
Matplotlib
# Matplotlib
dos diosas
这个作者很懒,什么都没留下…
展开
-
Chapter01.06::为图像添加水平或者垂直参考线
import matplotlib.pyplot as pltimport numpy as npx=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)pl...原创 2020-04-28 21:38:31 · 289 阅读 · 0 评论 -
Chapter01.05::使用grid函数为图像添加网格参考线
import matplotlib.pyplot as pltimport numpy as npx=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.grid(linestyle=":",color="r")plt.s...原创 2020-04-28 21:37:09 · 235 阅读 · 0 评论 -
Chapter01.04::在坐标轴上添加标记信息
import matplotlib.pyplot as pltimport numpy as npx=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.xlabel("x-axis")plt.ylabel("y-axis...原创 2020-04-28 21:35:14 · 110 阅读 · 0 评论 -
Chapter01.03::使用xlim显示X轴坐标的范围
import matplotlib.pyplot as pltimport numpy as npx=np.linspace(0.05,10,1000)y=np.random.rand(1000)plt.scatter(x,y,label="scatter figure")plt.legend()plt.xlim(0.05,10)plt.ylim(0,1)plt.show...原创 2020-04-28 21:34:10 · 147 阅读 · 0 评论 -
Chapter01.02::使用scatter绘制散点图
import matplotlib.pyplot as pltimport numpy as npx=np.linspace(0.05,10,1000)y=np.random.rand(1000)plt.scatter(x,y,label="scatter figure")plt.legend()plt.xlim(0.05,10)plt.ylim(0,1)plt.show()...原创 2020-04-28 21:33:07 · 122 阅读 · 0 评论 -
Chapter01.01::利用plot()函数绘制余弦函数图像
import matplotlib.pyplot as pltimport numpy as npx=np.linspace(0.05,10,1000)y=np.cos(x)plt.plot(x,y,ls="-",lw=2,label="plot figure")plt.legend()plt.show()原创 2020-04-28 21:31:46 · 387 阅读 · 0 评论