Closed
Description
For some reason, using ggsave on a theme_minimal plot messes up with the background of my plots, which I need to manually specify to white to get the expected behaviour.
I'm using R 4.1.1 on Windows 10, with ggplot2 version 3.3.6.
library(ggplot2)
ggplot(msleep, aes(sleep_rem, sleep_total)) + geom_point()
ggsave("white.jpg")
ggplot(msleep, aes(sleep_rem, sleep_total)) + geom_point() + theme_minimal()
ggsave("black.jpg")
ggplot(msleep, aes(sleep_rem, sleep_total)) + geom_point() + theme_minimal()
ggsave("white2.jpg", bg = "white")
As of last week, I never had to specify the bg color in ggsave to have the white one.
Metadata
Metadata
Assignees
Labels
No labels