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

Recommended Approach: Creating GIfs #1

Closed
Btibert3 opened this issue Oct 31, 2022 · 2 comments
Closed

Recommended Approach: Creating GIfs #1

Btibert3 opened this issue Oct 31, 2022 · 2 comments

Comments

@Btibert3
Copy link

Your library is fantastic. I have successfully built out a process that lets me run through a series of data and via .scatter I can plot the location of events. The issue is that the build process is painfully slow.

I have attempted various solutions (cla, clf, ax.clear). While some of my attempts certainly sped up the build, I lost the plot of the rink. As you can likey tell from this question, I am not the most robust user of matplotlib.

This is not an issue with your library of course, but I am wondering if you have any recommendations on we might be able to use the rink, perhaps plot data via .scatter, and then clear out the scatter for the next "frame" being plotted. I believe that the slowness in the build process is due to re-drawing the rink, which is why I am wondering if you have any suggestions on how to draw the rink just once in a loop.

Cheers.

@the-bucketless
Copy link
Owner

Yeah, I found this too when I was making GIFs with the BDC data. You can see how I dealt with it here.

Basically, you keep a global variable for the scatter object that you can .remove() at the start of each frame rather than re-drawing.

@Btibert3
Copy link
Author

Btibert3 commented Nov 1, 2022

Great, thank you for the quick response. This is very helpful.

@Btibert3 Btibert3 closed this as completed Nov 1, 2022
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

2 participants