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.0.tar.gz
(47.5 kB
view hashes)
Built Distribution
Close
Hashes for pyfragments-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b541a1c7af06d75a1c36a85a07f8fd7ff9fce09735fadd5d0b4eb15a5f0b4be7 |
|
MD5 | f297a559648d3704673e82903601b4c8 |
|
BLAKE2b-256 | ebb48373ac22b61a0e715beac7551187601081e8a5d3bdd5acfe8daded89ae99 |