#' Set ggplot2 theme that is customized to UST branding and styling.
#'
#'
#'These functions go within a ggplot to color or fill with the proper UST branding: _doc has smaller text and _ppt has larger text.
#'
theme_set_ust_doc <- function(base_size = 10) {
ggplot2::theme_set(ggplot2::theme_minimal(base_family = "Avenir Next Cyr", base_size = base_size) +
ggplot2::theme(plot.title = ggplot2::element_text(size = base_size + 4, face = "bold"),
strip.text = ggplot2::element_text(size = base_size),
axis.title = element_text(size = base_size),
plot.caption = ggplot2::element_text(size = base_size - 2)
)
)
}
theme_set_ust_calibri_doc <- function(base_size = 10) {
ggplot2::theme_set(ggplot2::theme_minimal(base_family = "Calibri", base_size = base_size) +
ggplot2::theme(plot.title = ggplot2::element_text(size = base_size + 4, face = "bold"),
strip.text = ggplot2::element_text(size = base_size),
axis.title = element_text(size = base_size),
plot.caption = ggplot2::element_text(size = base_size - 2)
)
)
}
theme_set_ust_ppt <- function(base_size = 14) {
ggplot2::theme_set(ggplot2::theme_minimal(base_family = "Avenir Next Cyr", base_size = base_size) +
ggplot2::theme(plot.title = ggplot2::element_text(size = base_size + 10, face = "bold"),
strip.text = ggplot2::element_text(size = base_size),
axis.title = element_text(size = base_size),
plot.caption = ggplot2::element_text(size = base_size - 2)
)
)
}
theme_set_ust_calibri_ppt <- function(base_size = 14) {
ggplot2::theme_set(ggplot2::theme_minimal(base_family = "Calibri", base_size = base_size) +
ggplot2::theme(plot.title = ggplot2::element_text(size = base_size + 10, face = "bold"),
strip.text = ggplot2::element_text(size = base_size),
axis.title = element_text(size = base_size),
plot.caption = ggplot2::element_text(size = base_size - 2)
)
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.