小编Yat*_*ong的帖子

运行时错误:init_func 必须返回一系列 Artist 对象

我正在尝试在我的 jupyter 笔记本上测试一个 Matplotlib 动画示例,如下所示:

from matplotlib import animation
# solve the ode problem of the double compound pendulum again

from scipy.integrate import odeint
from numpy import cos, sin

g = 9.82; L = 0.5; m = 0.1

def dx(x, t):
    x1, x2, x3, x4 = x[0], x[1], x[2], x[3]

    dx1 = 6.0/(m*L**2) * (2 * x3 - 3 * cos(x1-x2) * x4)/(16 - 9 * cos(x1-x2)**2)
    dx2 = 6.0/(m*L**2) * (8 * x4 - 3 * cos(x1-x2) * x3)/(16 …
Run Code Online (Sandbox Code Playgroud)

python matplotlib

7
推荐指数
1
解决办法
7826
查看次数

标签 统计

matplotlib ×1

python ×1