theme_cad | R Documentation |
Apply advanced CAU styling to your plot
theme_cad(p, discrete_cutoff = 9, source_text = "", background = TRUE)
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 |
A ggplot2 object, with styling applied. This can then be edited further by adding additional ggplot2 layers with '+' if needed.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.