theme_cad: Apply advanced CAU styling to your plot

View source: R/theme_cad.R

theme_cadR Documentation

Apply advanced CAU styling to your plot

Description

Apply advanced CAU styling to your plot

Usage

theme_cad(p, discrete_cutoff = 9, source_text = "", background = TRUE)

Arguments

p

The un-styled plot you've created (with 'p <- ggplot(...)' etc)

discrete_cutoff

When working out whether to apply a continuous or discrete (categorical) colour scale to your plot, 'theme_cau' checks to see how many unique values there are in the variable that you specified in the 'colour' aesthetic in 'p'. If there the number of unique values is less than or equal to 'discrete_cutoff', then it is treated as a categorical scale. Default value is 9.

source_text

What text (if any) you want to include as the source for the data in the plot

background

Whether you want the plot to have a (grey) background or not

Value

A ggplot2 object, with styling applied. This can then be edited further by adding additional ggplot2 layers with '+' if needed.


jtattersall09403/cadify documentation built on May 13, 2022, 12:50 a.m.