A collection of SNAP custom styled ggplot themes.
theme_snap(base_size = 14, base_family = "", base_col = "black", base_fill = "white", grid_col = "#F0F0F0") theme_snapdark(base_size = 14, base_family = "", base_col = "white", base_fill = "#242424", grid_col = "#333333")
base_size | numeric, base font size. |
---|---|
base_family | character, font family. |
base_col | default overall theme color. |
base_fill | default overall background/fill color. |
grid_col | default grid lines color. |
a ggplot theme.
These themes are for ggplot objects, on which most stock SNAP plot functions are based. The primary differences between available themes are the default fill and color options.
library(ggplot2) x <- c(rnorm(100), rnorm(100, 2)) d <- data.frame(x = x, grp = rep(LETTERS[1:2], each = 100)) g <- ggplot(d, aes(x, colour = grp, fill = grp)) + geom_density(size = 1, alpha = 0.5) g + theme_snap()g + theme_snapdark()