The state each cell the runner runs starts afresh with, whatever the cells before it did. knitr gives each chunk a new plot on a new
device with default graphics parameters, unless opts_knit$set(global.device = TRUE) keeps one device for all chunks (and with it
the graphics parameters) or global.par = TRUE the graphics parameters, and runs it in the directory of the document (checked with
knitr 1.51, R Markdown, and Quarto). Jupyter gives each cell a new plot, a session keeps everything.
The state each cell the runner runs starts afresh with, whatever the cells before it did. knitr gives each chunk a new plot on a new device with default graphics parameters, unless
opts_knit$set(global.device = TRUE)keeps one device for all chunks (and with it the graphics parameters) orglobal.par = TRUEthe graphics parameters, and runs it in the directory of the document (checked with knitr 1.51, R Markdown, and Quarto). Jupyter gives each cell a new plot, a session keeps everything.