天天看点

pylab绘制图表

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

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()
           
pylab绘制图表

继续阅读