我是Python和matplotlib的新手。我试图在Python中绘制方程图,但我不能。你能帮我找出我做错的地方吗?
我的代码在这里:
import matplotlib.pyplot as plt
def plotgraph ():
T = -14
index = 0
ro = []
while(T<=14):
ro.append( 1000 - ((T-4)*(T-4)) / 180)
T = T + 0.001
plt.plot(ro[index],T)
index = index +1
return
plotgraph()
plt.show()