今天学了Python 绘制了一幅正弦曲线 哈哈
需要numpy Python 库的支持
- >>>import numpy as np
- >>> import matplotlib.pyplot as plt
- >>> x=np.arange(-np.pi,np.pi,0.01)
- >>> y=np.sin(x)
- >>> plt.plot(x,y,'g')
- [<matplotlib.lines.Line2D object at 0x01AA20F0>]
- >>> plt.show()
![](https://i-blog.csdnimg.cn/blog_migrate/c2d302a981ba88fe3f92c4d0fd0ee25a.png)
转载于:https://blog.51cto.com/lyncmaster/527173