Author: Notus(hehe_xiao@qq.com)
Create: 2019-02-22
Update: 2019-02-22
pylab画正弦曲线
环境
Python version: 3.7.1
代码如下(a.py)
'''
利用 pylab 画正弦图
@Author: Notus(geneleo@qq.com)
@Create: 2019-02-22
@Update: 2019-02-22
@Version: 0.1
'''
import math
import pylab
x = []
y = []
num = 0.0
while num <= math.pi * 4:
x.append(num)
y.append(math.sin(num))
num += 0.1
pylab.plot(x, y, 'ro')
pylab.show()