https://github.com/parrt/pltvid
A simple library to capture multiple matplotlib plots as a movie.
https://github.com/parrt/pltvid
Last synced: 6 months ago
JSON representation
A simple library to capture multiple matplotlib plots as a movie.
- Host: GitHub
- URL: https://github.com/parrt/pltvid
- Owner: parrt
- License: mit
- Created: 2021-01-26T21:06:42.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-04-04T18:00:29.000Z (almost 5 years ago)
- Last Synced: 2025-07-07T08:11:33.881Z (8 months ago)
- Language: Jupyter Notebook
- Size: 74.2 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pltvid
A simple library to capture multiple matplotlib plots as a GIF movie, inspired by the [library](https://github.com/jwkvam/celluloid) from @jwkvam. See [examples.ipynb](examples.ipynb)
This notebook requires poppler lib due to pltvid lib
On mac:
```bash
brew install poppler
```
Example:
```python
camera = pltvid.Capture()
for x in np.arange(0,1,.1):
fig, ax = plt.subplots(1,1,figsize=(3,2))
ax.text(x, 0.5, "hi")
camera.snap()
camera.save("/tmp/sample.png", duration=200)
```
Can save animations as .png or .gif; .png is much more hi-res but powerpoint can only animate gifs, if that matters to you.
This is really meant for my own use, but go for it if you find it helpful.