#' @title Themes
#' @description returns ggproto theme object
#' @keywords ggplot theme
#' @import ggplot2
#' @import viridis
#' @importFrom magrittr %>%
#' @export
#' @examples
#' theme_nba_dark()
theme_nba_dark <- function() {
custom_theme <- theme(
text = element_text(color = 'white', family = 'Avenir'),
axis.ticks = element_blank(),
axis.line = element_line(color='white'),
axis.text = element_text(color='white'),
panel.grid.major = element_blank(),
panel.grid.minor = element_blank(),
panel.background = element_rect(fill = 'black', color = 'black'),
plot.background = element_rect(fill = 'black'),
legend.title = element_text(color='white'),
plot.title = element_text(size = 20, face = 'bold', color = 'white'),
plot.subtitle = element_text(size = 16, face = 'bold', color = 'white'),
plot.caption = element_text(color = 'white')
)
return (custom_theme)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.