pylab绘制图表

来源:互联网 发布:数据库未打开怎么解决 编辑:程序博客网 时间:2024/05/12 20:47

最少的代码画曲线,当工具用吧:


from pylab import *# -*- coding:utf-8 -*-t = arange(0.0, 2.0, 0.01)s = sin(2*pi*t)plot(t, s, linewidth=1.0)xlabel('t(s)')ylabel('voltage (mV)')title('About as simple as it gets, folks')grid(True)show()



原创粉丝点击