Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The example you've provided is not working for me 'as is', an exception occurs:

TypeError: descriptor 'parent' of 'sage.structure.sage_object.SageObject' object needs an argument

Nonetheless if you need to create an animation from a complicated plot, why not just use Python's list? animate function seems to work fin with that. Here is an example of animation from the frames created from two plots each:

import numpy as np

plots = []

N = 64

for phi in np.arange(0, pi, pi / N):
    frame = plot(sin(x + phi), 0, 2 * pi)
    frame += line([(0, sin(phi)), (2 * pi, sin(phi))], linestyle='--')
    plots.append(frame)

animate(plots)