pdf(); ...; dev.off() (or the same for
png(), etc.)ggsave() [automatically saves most recent
ggplot, but can specify a gg* object]width, height in
pdf(), png(), etc. (different units!)
width, height in ggsave
(always inches for any format)cex (base
R) or theme_*(base_size = ...) (ggplot2)fig.width, fig.height
(Rmarkdown), fig-width, fig-height (quarto)
(can set these to a default spec in a document, in YAML header or via
knitr::opts_chunk())out.height/out.width (Rmarkdown),
out-height/out-width (Quarto):
output-format dependentHeight of the plot in the output document, which can be different from its physical fig-height, i.e., plots can be scaled in the output document. Depending on the output format, this option can take special values. For example, for LaTeX [PDF] output, it can be 3in, or 8cm; for HTML, it can be 300px [OR “50%”]