中の極性円のアニメーションが永続的に、膨張・縮小、円、のための振動ダイナミクスをシミュレートするために私のpythonファイルです:ここでのpython
import numpy as np
from matplotlib import pyplot as plt
from matplotlib import animation
fig = plt.figure()
ax = plt.axes(xlim=(0, 2), ylim=(-2, 2))
line, = ax.plot([], [], lw=2)
def init():
line.set_data([], [])
return line,
def animate(i):
theta = np.linspace(0, 2 * np.pi, 100)
r = np.sqrt(np.abs(np.sin(0.1 * i)))
x = r * np.cos(theta) + 1
y = r * np.sin(theta)
line.set_data(x, y)
return line,
anim = animation.FuncAnimation(fig, animate, init_func=init, frames=200, interval=20, blit=True)
plt.show()
しかし、パラメトリック定義には欠陥がある、などという結果ISN」ですアニメーションサークルですが、省略記号です。
どうすれば修正できますか?