#' personalised theme
#'
#'
#' @keywords theme
#' @export
#' @examples
#' ggplot() + theme_matt()
theme_matt <- function(font = "Nyala")
{
theme_minimal()+
theme(
rect = element_rect(fill = "#f0f3f0", color = NA),
text = element_text(size = 18, family = font),
plot.title = element_text(size = 25, hjust= 0.5),
plot.caption = element_text(size = 12),
axis.title = element_text(size = 22, hjust= 0.5),
axis.text = element_text(size = 18),
axis.ticks = element_blank(),
axis.line = element_blank(),
plot.background = element_rect(fill = "#f0f3f0", color = NA),
panel.background = element_rect(fill = "#f0f3f0", color = NA),
panel.border = element_blank(),
panel.grid.major.y = element_line(color = "#d0d7d0", size = 0.9),
panel.grid.minor = element_blank(),
legend.position = "top",
legend.title = element_blank(),
legend.text = element_text(size = 18),
legend.box.background = element_rect(fill = "#f0f3f0", color = NA),
legend.key = element_rect(fill = "#f0f3f0", color = NA),
legend.direction = "horizontal",
legend.justification = "center")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.