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.1.1.tar.gz
(47.5 kB
view hashes)
Built Distribution
Close
Hashes for pyfragments-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 941ca85b46b2a450b8a0ef6459b3a14be0bb70836dcea17ebf51e69788a3c9e3 |
|
MD5 | 0d417f71d4126595411b7333a5f5fb34 |
|
BLAKE2b-256 | f2cd4db6e182a7350709ab14a0b5089fe2b547725350033034945ba2a4aa9feb |