---
format: revealjs
---
## Animated scatterplot
Move to the next slide to see the transitions.
```{python}
from matplotlib.figure import Figure
from pyfragments.svg import animate
fig = Figure()
ax = fig.add_subplot()
for i in range(3):
ax.scatter(i, i, s=200, gid=".fragment")
animate(fig)
```
---
## Animated images
Move to the next slide to see the transitions.
```{python}
#| output: asis
import matplotlib
import numpy as np
rng = np.random.default_rng(0)
matplotlib.rc("image", composite_image=False)
fig = Figure()
ax = fig.add_subplot()
for i in range(3):
ax.imshow(rng.random((10, 10)), gid=".fragment")
animate(fig)
```