Skip to content

In dashboard, plt.show() show intermediate matplotlib output #11150

@cderv

Description

@cderv
---
title: "Reproducible Quarto Document"
format: 
  html: default
  dashboard: default
engine: jupyter
---

```{python}
#| echo: false
import matplotlib.pyplot as plt

x = [1, 2, 3, 4, 5, 10]
p = plt.boxplot(x)
plt.title("Test");
plt.show()
```

We get this in HTML
Image

And this in dashboard
Image

Suppressing plt.show() output is ok :

plt.show();

So it seems we don't consider output the same in Dashboard and HTML, and that supressing output with ; is required with matplotlib show()

If this is expected, we should probably document the difference. Though I am surprised - hence why I open the issue for future reference.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions