matplotlib.pyplot笔记
来源:互联网 发布:网络电视腾讯 编辑:程序博客网 时间:2024/05/23 12:26
plot()基本绘图
阅读官方docs笔记
import matplotlib.pyplot as pltimport numpy as npa = [1,2,3,4]b = [5,6,7,8]
示例1
plt.plot(a) # 单参数默认为因变量的值,plot默认绘画直线段plt.ylabel('y')plt.xlabel('x')plt.show() # 展示绘图
示例2
c = [x*y for x,y in zip(a,b)]plt.show()plt.plot(a,c, 'ro')plt.axis([0,5,0,35]) # [xmin,xmax,ymin,ymax] x,y轴的范围plt.show()
示例3 用numpy中的array
t = np.arange(0., 5., 0.2)plt.plot(t, t, 'r--', t, t**2, 'bs', t, t**3, 'g^')plt.show()
阅读全文
0 0
- matplotlib.pyplot笔记
- matplotlib.pyplot
- matplotlib.pyplot
- python matplotlib.pyplot importerror
- 【python】matplotlib.pyplot介绍
- matplotlib.pyplot.imshow
- matplotlib.pyplot介绍
- matplotlib.pyplot画图
- matplotlib.pyplot入门
- Python---matplotlib.pyplot
- matplotlib.pyplot.py
- matplotlib.pyplot介绍
- 学习matplotlib--pyplot教程
- 【python】matplotlib.pyplot入门
- import matplotlib.pyplot 错误
- matplotlib.pyplot.figure
- matplotlib.pyplot.subplot
- matplotlib入门之Pyplot
- NOIP2017提高组D2
- 狄利克雷分布
- 【Scikit-Learn 中文文档】随机梯度下降
- jsp那些事(1)
- Leetcode——728. Self Dividing Numbers
- matplotlib.pyplot笔记
- 大脑黑客
- 电商架构
- 【Scikit-Learn 中文文档】最近邻
- Oracle时间情景
- [DesignPattern]TemplateMethodPattern
- POJ
- 三、内核时钟(1)
- 17.11.22,web学习第九天,还有一年,努力吧青年