Ask Your Question
0

Best way to animate an empty chessboard with changing square colors

asked 2012-06-19 15:35:54 +0100

chaesloc2 gravatar image

I have an n by n chessboard (without any pieces on it) and a rule that changes the colors of some of the squares. I want an animation showing the chessboard after each change.

My current way is to generate each frame using "list_plot([list of red squares],color=red)+list_plot([list of blue squares],color=blue)+...", then "animate([list of frames])". Example output: http://www.4shared.com/photo/JcjFymIV...

Issues with that method: - animating a list of plots takes ages - the squares are shown as discs

Can anyone recommend a better way?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2012-06-19 16:01:13 +0100

kcrisman gravatar image

Animation is slow, for reason discussed elsewhere on this forum. However, for the squares, why not use a polygon with fill=True? list_plot just makes points. You could try to use line with some weird matplotlib marker, but probably they will not be exactly the size you want.

edit flag offensive delete link more

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: 2012-06-19 15:35:54 +0100

Seen: 744 times

Last updated: Jun 19 '12