Skip to contents

A ggplot2 theme built from Surge soda: a black background, a Surge green frame and title, green, red, orange, yellow, and white marks, a dark to bright green continuous scale, and a Barlow title.

Usage

theme_surge(
  base_size = 15,
  base_family = register_font("Arimo"),
  title_family = register_font("Barlow", weight = 700),
  mode = c("dark", "light")
)

Arguments

base_size

Base font size. Defaults to 15.

base_family

Base font family. Defaults to Arimo, which ships with ggrewindr.

title_family

Title font family. Defaults to Barlow when it's available, otherwise "sans".

mode

"dark" (the default) or "light".

Value

A ggplot2 theme object.

Details

Use mode = "light" for a light background with darker text and marks.

Examples

library(ggplot2)
ggplot(data.frame(x = c("a", "b", "b")), aes(x = x, fill = x)) +
  geom_bar() +
  labs(title = "Surge") +
  theme_surge(base_family = "sans", title_family = "sans")