themes: SNAP plot themes

Description Usage Arguments Details Value Examples

Description

A collection of SNAP custom styled ggplot themes.

Usage

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")

Arguments

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.

Details

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.

Value

a ggplot theme.

Examples

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()

leonawicz/snapplot documentation built on May 17, 2019, 1:33 p.m.