When plotting a ggplot graph with geom_sf the resulting plot has a white 'frame'. Is there an easy way in blogdown to set the color of this frame, i.e. to the background color of the blogdown theme.
The issue has been raised before, here , here, here, and here but I was wondering whether there is a more 'direct' solution in blogdown.
Many thanks.
library(tidyverse)
library(sf)
nc <- sf::st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE)
ggplot(nc) +
geom_sf(aes(fill = AREA))+
theme(plot.background=element_rect(fill="grey80"))