#' @title graphStyle
#'
#' @description Style for graphs
#'
#' Add to the bottom of GGPlots
#'
#' @export
#' @import ggplot2 extrafont
#'
#' @return Nothing
graphStyle <- function () {
font <- "Gill Sans MT"
theme(plot.title = element_text(family = font,
size = 28, face = "bold", color = "#222222"),
plot.subtitle = element_text(family = font,
size = 22, margin = margin(9, 0, 9, 0)),
plot.caption = element_blank(),
legend.position = "top",
legend.text.align = 0,
legend.background = element_blank(),
legend.title = element_blank(),
legend.key = element_blank(),
legend.text = element_text(family = font, size = 18,
color = "#222222"),
axis.title = element_blank(),
axis.text = element_text(family = font, size = 18,
color = "#222222"),
axis.text.x = element_text(margin = margin(5, b = 10)),
axis.ticks = element_blank(),
axis.line = element_blank(),
panel.grid.minor = element_blank(),
panel.grid.major.y = element_line(color = "#cbcbcb"),
panel.grid.major.x = element_blank(),
panel.background = element_blank(),
strip.background = element_rect(fill = "white"),
strip.text = element_text(size = 22, hjust = 0))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.