Ask Your Question
2

Animate Bar Graph

asked 2014-11-04 19:39:58 +0100

sagebar gravatar image

updated 2014-11-04 21:57:35 +0100

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
1

answered 2014-11-04 21:57:16 +0100

vdelecroix gravatar image

updated 2018-04-06 20:04:07 +0100

slelievre gravatar image

Hello,

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.

Vincent

edit flag offensive delete link more

Comments

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

sagebar gravatar imagesagebar ( 2014-11-04 22:18:39 +0100 )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 http://nbviewer.ipython.org/github/ja...

vdelecroix gravatar imagevdelecroix ( 2014-11-04 23:47:26 +0100 )edit

@vdelecroix -- the link in your comment got corrupted by Askbot...

If the corresponding Askbot bug is fixed, the following link should work.

http://nbviewer.jupyter.org/github/ja...

slelievre gravatar imageslelievre ( 2018-04-09 01:27:33 +0100 )edit

Apparently the Askbot bug is fixed, in that new links at the end of comments work.

This correct behaviour for new posts does not fix links at the end of comments from before the fix.

slelievre gravatar imageslelievre ( 2018-04-09 01:28:03 +0100 )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

Stats

Asked: 2014-11-04 19:39:58 +0100

Seen: 395 times

Last updated: Apr 06 '18