Add animations to revealjs presentations from Python code-blocks.
Project description
PyFragments
Add animated figures to your Quarto presentations.
Install
pip install pyfragments
Example
A Revealjs presentation created with Quarto, which displays an animated matplotlib figure:
This is created with the following code,
in a Quarto .qmd
file.
---
format: revealjs
---
## Example of an animated figure
Move to the next slide to see the transitions.
```{python}
# | output: asis
import matplotlib.pyplot as plt
from pyfragments import AnimatedFigure
with AnimatedFigure() as ani:
plt.xlim(0, 10)
plt.ylim(0, 10)
for i in range(10):
with ani.fragment():
plt.scatter(i, i)
```
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyfragments-0.2.2.tar.gz
(48.4 kB
view hashes)
Built Distribution
Close
Hashes for pyfragments-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8e89429e24bd20dc38890886f10f6ca26b27326bef9269000f9453f8899f5af |
|
MD5 | b28a45709e984634002b3e71abd386e0 |
|
BLAKE2b-256 | 8ddc3459f3c0792795fcbfd928ba51adad467fad7221d7d82c42085cf73344e5 |