#!/usr/bin/env python
#coding=GBK
import pylab
import math
a = range(0, 360+1) #度数
x = map(lambda x:math.pi*x/180.0, a)
#y = map(lambda x:math.sin(x*math.pi/180.0), a)
y = map(lambda x:math.sin(x), x)
pylab.plot(x,y)
pylab.title('y = sin(x)')
pylab.xlabel('x')
pylab.ylabel('y')
pylab.show()
|