Description Usage Arguments Details Value Examples
A collection of SNAP custom styled ggplot themes.
1 2 3 4 5 | 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. |
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.
a ggplot theme.
1 2 3 4 5 6 7 | 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()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.