theme_correlaid: CorrelAid theme for ggplot2

View source: R/ggplot-theme.R

theme_correlaidR Documentation

CorrelAid theme for ggplot2

Description

A theme based on the CorrelAid design guide

Usage

theme_correlaid(
  base_size = 14,
  base_family = "Roboto",
  base_line_size = base_size/28,
  base_rect_size = base_size/28,
  grid = "XY"
)

Arguments

base_size

base font size, given in pts.

base_family

base font family

base_line_size

base size for line elements

base_rect_size

base size for rect elements

grid

A string: panel grid ("none" or a combination of X, x, Y, y)

Details

Uses the font family Roboto. If Roboto is not installed, the system's default (sans-serif) font is used.

Value

A theme object

Examples

library(ggplot2)
library(showtext)
showtext_auto() # Necessary for certain graphics devices to display the custom font

ggplot(mtcars, aes(wt, mpg)) + geom_point() + theme_correlaid()

ggplot(example_projects_labels, aes(category)) +
 geom_bar() +
 labs(title = "Title", subtitle = "Subtitle", caption = "Caption") +
 theme_correlaid() +
 add_correlaid_logo()

CorrelAid/correltools documentation built on April 26, 2023, 8:19 a.m.