Full white background for any ggplot chart

Full white background for any ggplot chart

Situation: You want a clean white background for your chart in GGPLOT, however you don’t remember how to adjust the theme().


df %>%
  ggplot() +
  geom_col() +
  # white background
  theme_minimal() +
  theme(
        legend.position = "bottom",
        panel.grid.major = element_line(colour = "white"),
        panel.grid.minor = element_line(colour = "white")
  )

For more content on data science, R, and Python find me on Twitter.

Previous
Next