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.3.0.tar.gz
(48.6 kB
view hashes)
Built Distribution
Close
Hashes for pyfragments-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a88a48ec302f4556f97c58aff5e20c1daad06401a09fb9c0f373a09c86661f3 |
|
MD5 | b157a77876c0af8762257e63f6619aee |
|
BLAKE2b-256 | b81f1b0c5b7d1b57cb731823cce97ba905bfbf4934d018606cc70e20161a2219 |