Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fig-height/fig-width with Pyodide might not be respected in RevealJS #71

Open
coatless opened this issue Nov 1, 2024 · 0 comments
Open

Comments

@coatless
Copy link
Collaborator

coatless commented Nov 1, 2024

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()
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant