add_colour: Function to add colour or fill to the plot

View source: R/add_colour.R

add_colourR Documentation

Function to add colour or fill to the plot

Description

This is a helper function used by ‘theme_cau()'. You shouldn’t need to call it directly.

Usage

add_colour(p, color_dim, type = c("colour", "fill"), discrete_cutoff = 9)

Arguments

p

Plot object created by 'p <- ggplot(...)' etc

color_dim

Which dimension has been set as the colour aesthetic in 'ggplot()'

type

Whether it's a fill or colour aesthetic

discrete_cutoff

Cutoff below which unique values are assumed to be categorical rather than continuous

Value

A ggplot layer that will be added to the 'p' plot object


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