import matplotlib.pyplot as plt
xx = []
yy = []
x = 0
y = 1
for i in range(10):
x = x + 0.1
y = 1.1*y-0.2*x/y
xx.append(x)
yy.append(y)
plt.plot(xx, yy)
plt.show() #出现窗口
结果:
import matplotlib.pyplot as plt
xx = []
yy = []
x = 0
y = 1
for i in range(10):
x = x + 0.1
y = 1.1*y-0.2*x/y
xx.append(x)
yy.append(y)
plt.plot(xx, yy)
plt.show() #出现窗口
结果: