转载https://blog.csdn.net/zhanghao3389/article/details/82685072
坑:同样的代码,在jupyter不能用,在pycharm能用
import matplotlib.pyplot as plt
ax = []
ay = []
plt.ion()
for i in range(100):
ax.append(i)
ay.append(i**2)
plt.clf()
plt.plot(ax,ay)
plt.pause(0.1)
plt.ioff()
plt.show()