色婷婷狠狠18禁久久YY,CHINESE性内射高清国产,国产女人18毛片水真多1,国产AV在线观看

animation函數解析

林玟書2年前16瀏覽0評論

animation函數解析?

代碼示例:

import matplotlib.pyplot as plt

import numpy as np

from matplotlib import animation

fig, ax = plt.subplots()

x = np.arange(0, 2 * np.pi, 0.01)

line, = ax.plot(x, np.sin(x))

def animate(i):

line.set_ydata(np.sin(x + i / 100))

return line,

def init():

line.set_ydata(np.sin(x))

return line,

ani = animation.FuncAnimation(fig=fig, func=animate, frames=100,

init_func=init, interval=20, blit=False)

plt.show()