theme_clean: Custom ggplot2 theme

View source: R/theme_clean.R

theme_cleanR Documentation

Custom ggplot2 theme

Description

A ggplot2 theme with opinionated defaults. Light background, no grid lines, legend at the bottom, etc.

Usage

theme_clean(
  base_size = 11,
  strip_text_size = 12,
  strip_text_margin = 5,
  subtitle_size = 13,
  subtitle_margin = 10,
  plot_title_size = 16,
  plot_title_margin = 10,
  ...
)

Arguments

base_size

base font size

strip_text_size

font size for strip text (facet text)

strip_text_margin

strip text margin

subtitle_size

font size for subtitle

subtitle_margin

subtitle margin

plot_title_size

font size for title

plot_title_margin

title margin

...

additional arguments passed to theme()

Examples

library(ymisc)
library(ggplot2)
diamonds %>%
  ggplot() +
  geom_hex(aes(carat, price, fill = cut)) +
  theme_clean()

enixam/ymisc documentation built on Nov. 22, 2022, 1:31 a.m.