【发布时间】:2015-08-13 17:41:31
【问题描述】:
我正在尝试在matplotlib 中绘制一个简单的抛物线,但我对如何在抛物线上绘制点感到困惑。到目前为止,这就是我所拥有的:
import matplotlib.pyplot as plt
a=[]
b=[]
y=0
x=-50
while x in range(-50,50,1):
y=x^2+2*x+2
a=[x]
b=[y]
fig= plt.figure()
axes=fig.add_subplot(111)
axes.plot(a,b)
plt.show()
x= x+1
【问题讨论】:
标签: python python-2.7 matplotlib