阅读量:119

在python中使用matplotlib模块和numpy模块绘制函数图,具体方法如下:
import matplotlib.pyplot as pyplot
import numpy
x=numpy.linspace(-10,10,200)
y=[i**2 for i in x]
pyplot.plot(x,y)
pyplot.show()
效果图:


在python中使用matplotlib模块和numpy模块绘制函数图,具体方法如下:
import matplotlib.pyplot as pyplot
import numpy
x=numpy.linspace(-10,10,200)
y=[i**2 for i in x]
pyplot.plot(x,y)
pyplot.show()
效果图:
