- Generate and playback recordings of user interactions with matplotlib figures.
- Integrates with sphinx gallery to automatically embed interactions in the docs without needing to manually generate gifs.
See https://mpl-playback.readthedocs.io/en/latest/gallery/index.html for an example of this in action.
Directly inspired by https://github.com/matplotlib/matplotlib/issues/19222
Command Line Usage
recording interactions To record a json file for later playback:
python -m mpl_playback.record example_file.py -figures fig --output example_playback.json
This will launch example_file.py and record any interactions with the object named fig. Then it will be saved to example_playback.json. However, the output argument is optional, if not given then the name will be example_file-playback.json
playback interactions in a gif
To play back the file you must pass both the original python file and the recording json file. You can optionally pass names for the output gif(s) with the --output argument, or allow the names to be chosen automatically. 1 gif will be created for each figure that was recorded.
python -m mpl_playback.playback example_file.py example_playback.json
Q: Should you use this?
A: Depends on what you want. For one off gifs of interactions it's almost certainly easier to just record your screen to make a gif. But if you want integration with sphinx-gallery then this is currently the only option.
Example of a rendered gif:
Metadata
Release files for mpl-playback 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mpl_playback-0.4.0.tar.gz | 2.5 MB | Without provenance | Details for mpl_playback-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mpl_playback-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for mpl_playback-0.4.0-py3-none-any.whl |
Total release size: 2.5 MB
Release files / mpl_playback-0.4.0.tar.gz
| Download URL | mpl_playback-0.4.0.tar.gz |
|---|---|
| Size | 2.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dbf932127e6eb44c832d3f4eb27d8f97abc6ca533af93645fd0444b04772ef66
|
|
BLAKE2b-256 checksum How to use checksums |
172647213be82bd1ff49826c8a6e9226366620afb78885241f78c8d1b27d29dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.5
|
Release files / mpl_playback-0.4.0-py3-none-any.whl
| Download URL | mpl_playback-0.4.0-py3-none-any.whl |
|---|---|
| Size | 11.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2ae968bf88177f54759716cb82cf24853185d7ebb5fc93aa4d72bfe81d313fb1
|
|
BLAKE2b-256 checksum How to use checksums |
23813ea9ddde5e10b57f98db77d64742f44d2f1f2484ab277ade076f5245cd25
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.5
|
Security for mpl-playback 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.