Description Usage Arguments Examples
A consistent ggplot theme for use by The Data Collective
1 2 3 4 5 6 7 8 9 10 11 12 | theme_tdc(
base_family = "Roboto Condensed",
base_size = 12,
plot_title_family = base_family,
plot_title_size = 28,
subtitle_family = "Roboto Condensed",
subtitle_size = 12,
title_family = base_family,
title_size = 14,
caption_family = base_family,
caption_size = 10
)
|
base_family, base_size |
base font family and size |
plot_title_family, plot_title_size |
plot title font family and size |
subtitle_family, subtitle_size |
subtitle font family and size |
title_family, title_size |
subtitle font family and size |
caption_family, caption_size |
caption font family and size |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
library(ggplot2)
library(dplyr)
# example scatterplot
ggplot(iris, aes(Sepal.Length, Petal.Length, colour = as.factor(Species))) +
geom_hline(yintercept = 0, colour = "#344055", size = 0.5) +
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") +
facet_wrap(~ Species) +
theme_tdc()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.