or
````qmd
---
title: "test"
format: html
knitr:
opts_knit:
global.device: true
embed-resources: true
---
First a plot with default parameters:
```{r}
plot(1:10)
Now let's change the color:
par(col="red")
And we plot again:
plot(1:10)
### Expected behavior
Resulting plots from code chunk render once after their respective chunk.
### Actual behavior
Initial plot gets rendered after each code chunk.
### Your environment
- IDE: RStudio 2024.04.2
- OS: Linux Ubuntu 22.04.4 LTS
### Quarto check output
Quarto 1.4.555
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.1.11: OK
Dart Sass version 1.69.5: OK
Deno version 1.37.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.4.555
Path: /usr/lib/rstudio-server/bin/quarto/bin
Bug description
Setting the knitr option for global device to true results in an unexpected behavior where the initial plot is displayed after each code chunk.
Steps to reproduce
First a plot with default parameters:
Now let's change the color:
And we plot again:
Now let's change the color:
And we plot again:
Quarto 1.4.555 [✓] Checking versions of quarto binary dependencies... Pandoc version 3.1.11: OK Dart Sass version 1.69.5: OK Deno version 1.37.2: OK [✓] Checking versions of quarto dependencies......OK [✓] Checking Quarto installation......OK Version: 1.4.555 Path: /usr/lib/rstudio-server/bin/quarto/bin
[✓] Checking tools....................OK TinyTeX: (not installed) Chromium: (not installed)
[✓] Checking LaTeX....................OK Using: Installation From Path Path: /usr/local/texlive/bin/linux Version: 2024
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK Version: 3.10.12 Path: /usr/bin/python3 Jupyter: (None)
[✓] Checking R installation...........OK Version: 4.4.1 Path: /usr/local/lib/R LibPaths:
[✓] Checking Knitr engine render......OK