Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Enable ffmpeg for animations for newer matplotlib #733

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

Merged
merged 3 commits into from
Aug 3, 2020

Conversation

dopplershift
Copy link
Contributor

Since ffmpeg GIF writing was fixed in matplotlib/matplotlib#18093, which will be included in matplotlib 3.3.1, enable using that for capturing animations (when running a recent enough version).

@codecov
Copy link

codecov bot commented Aug 2, 2020

Codecov Report

Merging #733 into master will decrease coverage by 0.02%.
The diff coverage is 83.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #733      +/-   ##
==========================================
- Coverage   97.60%   97.57%   -0.03%     
==========================================
  Files          32       32              
  Lines        3672     3676       +4     
==========================================
+ Hits         3584     3587       +3     
- Misses         88       89       +1     
Impacted Files Coverage Δ
sphinx_gallery/scrapers.py 96.79% <83.33%> (-0.48%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b987784...9e3cfd7. Read the comment docs.

@larsoner
Copy link
Contributor

larsoner commented Aug 2, 2020

Pushed a couple of trivial commits to fix SyntaxError and NameError. I can test on a machine that has matplotlib master on it tomorrow on SG master and this PR and make sure it works.

@larsoner larsoner closed this Aug 2, 2020
@larsoner
Copy link
Contributor

larsoner commented Aug 2, 2020

Whoops, wrong button...

@larsoner larsoner reopened this Aug 2, 2020
@dopplershift
Copy link
Contributor Author

Every time I think I can write correct code the first time without running it, I get proven wrong.

@larsoner
Copy link
Contributor

larsoner commented Aug 3, 2020

master produces a 126k gif:

sphx_glr_plot_8_animations_thumb

Hacking the version check to use 3.3.0 (latest master still installs on my version as a 3.3.0.something) it produces a 16 kB one:

sphx_glr_plot_8_animations_thumb

Awesome! Thanks @dopplershift

@larsoner larsoner merged commit c642212 into sphinx-gallery:master Aug 3, 2020
@dopplershift dopplershift deleted the anim-version branch August 3, 2020 18:32
@dopplershift
Copy link
Contributor Author

🎉 Glad it had a good impact.

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

Successfully merging this pull request may close these issues.

2 participants