R/set-theme-ust.R

Defines functions theme_set_ust_calibri_ppt theme_set_ust_ppt theme_set_ust_calibri_doc theme_set_ust_doc

Documented in theme_set_ust_doc

#' 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)
                       )
  )
}
UniversityOfSaintThomas/ustr documentation built on April 23, 2020, 12:44 a.m.