inst/examples/ex-theme_foundation.R

library("ggplot2")

ggplot(mtcars, aes(x = wt, y = mpg)) +
  geom_point() +
  theme_foundation()

# Extend the foundation to build a new theme
theme_minimal_box <- function(...) {
  theme_foundation(...) +
    theme(
      panel.grid = element_blank(),
      axis.ticks = element_line()
    )
}

ggplot(mtcars, aes(x = wt, y = mpg)) +
  geom_point() +
  theme_minimal_box()

Try the ggthemes package in your browser

Any scripts or data that you put into this service are public.

ggthemes documentation built on Oct. 4, 2026, 1:06 a.m.