R/load_custom_theme.R

Defines functions load_custom_theme

Documented in load_custom_theme

#' Loads Custom Theme for the Plots 
#'
#' @return ggplot theme object
#' @export
#' @import ggplot2
#' 
load_custom_theme <- function(){
  out <- tryCatch({
    covid19_theme <- theme_minimal()+
      theme(
        axis.title.x = element_text(face = "bold",
                                    size = 12,
                                    hjust = 0),
        axis.title.y = element_text(face = "bold",
                                    size = 12),
        title = element_text(face = "bold"),
        axis.text.x = element_text(face = "bold"),
        axis.text.y = element_text(face = "bold"),
        legend.title = element_blank())
    covid19_theme
  },
  error = function(cond){
    message("Error in function load_custom_theme()")
    message(cond)
  })
}
viniciusmsousa/Covid19-Monitor documentation built on April 9, 2021, 3:34 a.m.