theme_tmth: _Trees, maps, and theorems_ plot theme

View source: R/theme-tmth.R

theme_tmthR Documentation

Trees, maps, and theorems plot theme

Description

A ggplot2 theme following some guidelines from the book Trees, maps, and theorems.

Usage

theme_tmth(
  base_size = 12,
  base_family = "Source Sans Pro",
  base_line_size = 0.4,
  base_rect_size = 0.4,
  aspect_ratio = 2/(1 + sqrt(5))
)

Arguments

base_size

Foundational font size

base_family

Foundational font family

base_line_size

Foundational line size

base_rect_size

Foundational rectangle size

aspect_ratio

Foundational aspect ratio (default: golden mean)

Value

A new theme derived from ggplot2::theme_bw()

Examples

## Not run: 
ggplot(mtcars) +
  geom_point(aes(wt, mpg)) +
  scale_x_continuous(limits = c(1, 6), breaks = seq(1, 6)) +
  scale_y_continuous(limits = c(10, 35)) +
  theme_tmth() +
  coord_capped_cart(left = "both", bottom = "both")

## End(Not run)

tomshafer/tshfr documentation built on Sept. 27, 2022, 2:42 p.m.