Ask Your Question

Animate Bar Graph

asked 2014-11-04 12:39:58 -0600

updated 2014-11-04 14:57:35 -0600

vdelecroix gravatar image

In SAGE, is there a way to use the animate command in conjunction with a bar graph?

I can't seem to get it to work. Let's say for argument's sake I want to have a list of N elements and I want to animate reading in each element and sort them by parity then display the output on a bargraph and then animate this through N iterations.

Thank you!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-11-04 14:57:16 -0600

vdelecroix gravatar image


Sage is not that smart with graphics but it comes with a very nice and complete Python library called matplotlib. You can adapt easily the code from these animation examples.


edit flag offensive delete link more


These don't seem to be working in the SageMathCloud - do you know why this might be?

sagebar gravatar imagesagebar ( 2014-11-04 15:18:39 -0600 )edit

The reason is that the animation is using the window manager. If you want something embedded in a web browser have a look at

vdelecroix gravatar imagevdelecroix ( 2014-11-04 16:47:26 -0600 )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: 2014-11-04 12:39:58 -0600

Seen: 89 times

Last updated: Nov 04 '14