Ask Your Question

load animation

asked 2013-04-17 09:22:06 +0200

twch gravatar image

Hi, I have the following problem:

I'd like to present some calculations in a sage notebook. At one point I'd like to show an animation, but unfortunately it takes some time until the .show() command plots it. I also do not like to have the animation wiggling araound while I'm presenting the other things before. Hiding the output also doesn't help because I want that it really starts from the beginning on my click and not soemwhere in between.

Is there a possibility to load a saved gif animation? Otherwise is is still possible to open the animation in new window, but it would be neat to have the animation inside the notebook.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-04-17 11:34:41 +0200

ndomes gravatar image

Save the animation

frames = [... list of your frames ...]
M = animate(frames)'movie.gif')

(Or upload the gif with the data menu)

Now you can use a html cell with an link to your gif.

<a href="data/movie.gif">animation</a>
edit flag offensive delete link more


Thanks! I also tried to create a link to the gif in my home folder but somehow I din't achiev this. Saving the gif in the DATA folder finnaly solves the problem.

twch gravatar imagetwch ( 2013-04-17 11:47:34 +0200 )edit

@ndomes: Super-cool! Can you find an appropriate place to add this to the documentation (perhaps in the animate module) to mention this as a great idea? I like the idea of using the html cell to keep it hidden.

kcrisman gravatar imagekcrisman ( 2013-04-18 00:37:44 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-04-17 09:22:06 +0200

Seen: 359 times

Last updated: Apr 17 '13