### Bug description

I am switching between `knitr` and `jupyter` engines for rendering a Matplotlib figure using the following reprex:

````
---
engine: jupyter  # knitr
---

```{python}
import matplotlib.pyplot as plt
import numpy as np

x = np.linspace(0, 2 * np.pi, 100)  # 100 values from 0 to 2𝜋
fig, ax = plt.subplots()
ax.plot(x, np.sin(x))
ax.set_title("jupyter")  # knitr
fig.patch.set_facecolor("red")
plt.show()
```
````

I noticed that the figure in the rendered HTML looks different depending on the engine.

knitr:
![knitr](https://user-images.githubusercontent.com/4377312/175530136-0f2c85cf-8409-4319-8f4f-ff435d770c63.png)

jupyter:
![jupyter](https://user-images.githubusercontent.com/4377312/175530153-f5ba8238-7e3e-47fa-b1f7-7f810c3a18ec.png)

I would expect that figures look identical independent of the rendering engine. Regardless of whether or not this is a bug, is there a workaround that sets a specified figure resolution/DPI/scale/... (for knitr and jupyter engines)?

I tried this on macOS 11.6.7.

<details>
<summary>Output of `quarto --check`:</summary>

```
[✓] Checking Quarto installation......OK
      Version: 0.9.613
      Path: /Users/clemens/Applications/quarto/bin

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.10.4
      Path: /Users/clemens/Repositories/python_data_analysis/.venv/bin/python3
      Jupyter: 4.10.0
      Kernels: python3

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........OK
      Version: 4.2.0
      Path: /Library/Frameworks/R.framework/Resources
      LibPaths:
        - /Library/Frameworks/R.framework/Versions/4.2/Resources/library
      rmarkdown: 2.13

[✓] Checking Knitr engine render......OK
```
</details>

### Checklist

- [X] [formatted your issue](https://yihui.org/issue/#please-format-your-issue-correctly) so it is easier for us to read?
- [X] included a minimal, self-contained, and reproducible example?
- [X] documented the quarto version you're running, by providing the output produced by `quarto check` in a terminal in your issue?
- [X] documented the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] documented which operating system you're running? If on Linux, please provide the specific distribution as well.
- [X] upgraded to the latest version, including your versions of R, the RStudio IDE, and relevant R packages?
2022-06-24T07:29:18Z
cbrnr
bug
closed
Rendered figure size depends on engine
https://github.com/quarto-dev/quarto-cli/issues/1219