Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

diagnose failure of interactive #5

Open
davidwhogg opened this issue Nov 27, 2012 · 4 comments
Open

diagnose failure of interactive #5

davidwhogg opened this issue Nov 27, 2012 · 4 comments
Assignees

Comments

@davidwhogg
Copy link
Owner

it doesn't work for me.

@ghost ghost assigned davidwhogg Nov 27, 2012
@jakevdp
Copy link
Collaborator

jakevdp commented Nov 27, 2012

I had another friend tell me that everything worked, except there was no animation of the face turns. My guess is there is different draw() behavior between systems/backends. It may be worth asking on the matplotlib list.

For reference, a video of how it looks on my machine can be seen here: http://jakevdp.github.com/blog/2012/11/26/3d-interactive-rubiks-cube-in-python/

@davidwhogg
Copy link
Owner Author

Is there a backend in your .matplotlibrc? And/or can you specify a backend where you know it works? Then I can use that one.

@jakevdp
Copy link
Collaborator

jakevdp commented Nov 28, 2012

I've only tested it on TkAgg

@richardhart89
Copy link

On Mac OS X using TkAgg backend, I was having the problem with no animation of the cube layers movement. This is the fix that worked for me.

At the end of the _draw_cube method after the call to self.figure.canvas.draw() add the following line:

self.figure.canvas.flush_events()

That should do it.

I got a clue when running the code under a debugger and saw that the cube layers did indeed animate. I also saw the animation when run unmodified on a RPi. The Matplotlib docs did say the plot is not automatically re-drawn with the draw method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants