Not sure that fig-height/fig-width cell options are being applied in a pyodide cell. If I'm remembering, the underlying matplotlib integration is using a custom shim?
---
title: "graph resize"
format: live-revealjs
---
## Let's graph
```{pyodide}
#| fig-height: 3
#| fig-width: 3
#| echo: false
#| autorun: true
import numpy as np
import matplotlib.pyplot as plt
a = 1
b = 0
x = np.linspace(0, 10, 100)
y = a * x + b
plt.figure(figsize=(8, 4))
plt.plot(x, y)
plt.grid(True)
plt.title(f'Linear Function: y = {a}x + {b}')
plt.show()
Not sure that
fig-height
/fig-width
cell options are being applied in a pyodide cell. If I'm remembering, the underlyingmatplotlib
integration is using a custom shim?