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.0.tar.gz
(48.1 kB
view hashes)
Built Distribution
Close
Hashes for pyfragments-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c26b5bb28320687f7856f6664132b2c2b3cd9cf76c72fbffc4224a19d3ddcf1 |
|
MD5 | b9da8747dbe188f16defe9886a455e48 |
|
BLAKE2b-256 | 56935418f2cce6af68b60f06bfd4ecfc46eb1597319549c2edbcb80485947772 |