Ask Your Question
0

Best way to animate an empty chessboard with changing square colors

asked 12 years ago

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?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
0

answered 12 years ago

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.

Preview: (hide)
link

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: 12 years ago

Seen: 786 times

Last updated: Jun 19 '12