style_clean: Create a new ggplot

Description Usage Arguments Examples

View source: R/theme_tdc.R

Description

This function masks 'ggplot()' from the ggplot2 package in order to apply additional styles appropriate to The Data Collective charts

Usage

1
style_clean(..., zero_line = "#344055", legend = FALSE)

Arguments

...

arguments intended for a ggplot

zero_line

a HEX colour value for the horizontal line (NA for no line)

legend

a boolean value indicating whether to include the legend

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
library(ggplot2)
library(dplyr)

# example scatterplot
ggplot(iris, aes(Sepal.Length, Petal.Length, colour = as.factor(Species))) +
  geom_point() +
  labs(title = "Fisher's *Iris* data set",
       subtitle = "Demonstrating the TDC theme for ggplot2",
       x = "The x axis", y = "The y axis",
       caption = "Fisher's **Iris** data set") +
       style_tdc()

## End(Not run)

thedatacollective/tdcthemes documentation built on March 25, 2021, 4:25 a.m.