Setting figure options globally with opts_chunk$set doesn't work with notebooks

I find that figure settings applied with opts_chunk$set don't work anymore with notebooks. I'm currently running RStudio version 1.2.1335.

The settings are applied if I manually knit to an html_document, but they aren't reflected in the RStudio source window, or in the html_notebooks that are produced upon saving.

Here are two chunks that I just tested in a notebook to confirm my findings. Many thanks!

library(knitr)
library(ggplot2)
opts_chunk$set(fig.height = 2, fig.width = 2)
ggplot(mtcars) + aes(hp, mpg) + geom_point()

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