文章目录
pillow 实现动画
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
fig, ax = plt.subplots()
plt.rcParams['font.size'] = 15
x = np.linspace(0, 2*np.pi, 1000)
ims = [] # 将每一帧都存进去
for i in range(len(x)):
bob, = ax.plot(x[i], np.sin(x[i]), 'o', markersize=20, color='yellow')
ims