Controlling plot size in .Qmd notebook

In an .Rmd notebook I use to be able to control the size of a plot shown in Rstudio using opts_chunk, for example:

knitr::opts_chunk$set(dev = "png",
                      dpi = 600,
                      echo = TRUE,
                      cache = TRUE)

What's the equivalent for .Qmd notebooks, please? My graphs within Rstudio are now too small be use useful again :slight_smile:

You should be able to insert the same in a code chunk in Quarto.

You can also set this in YAML know. See

If you're looking for a R Notebook equivalent, follow this issue

If this is an issue specific to RStudio IDE preview in source, maybe you can open an issue in the IDE repo.

Thanks for this.

I need it to do one thing when I'm using it like an .Rmd without output to the RStudio notebook, and another when I'm rendering to produce a final .html file. But, from your second link, maybe this just isn't how Quatro is designed to work? If I want to work interactivly on a project, then publish a final html, is that not something that Quatro can do?

I did originally raise this on the IDE group here but it seems it got moved over here. Maybe someone with authority could move it back again if you think it's a question for the IDE folks?

You should be able to run interactively the chunk. I am just not sure you can control the plot size using knitr options.

If there are respected with Rmd document, and not Quarto (qmd), then I would open an issue with examples in the RStudio IDE github repo for missing feature.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.