od_theme: Opendoor's ggplot2 theme

Description Usage Arguments Value Author(s) Examples

View source: R/package_functions.R

Description

The full list of colors of the palette are: blue = "#1c85e8", navy = "#1d2c4c", iris = "#ab80de", turquoise = "#68e1c7", citrine = "#ffc259", ruby = "#ff7f82", lightgrey = "#babcbc", bluegrey = "#7b9cb1", coolgrey = "#506d7e", warmgrey = "#525975", lightgreytint = "#f0f0f0".

Usage

1
2
od_theme(palette = "main", discrete = T, reverse = F, addblack = F,
  n = NULL, colors = NULL)

Arguments

palette

A character string giving the name of one of the palattes ("main", "cool", "warm", "grey").

discrete

A boolean(T, F) indicator setting whether to use a discrete or continuous theme. The default is F.

reverse

A boolean(T, F) indicator for whether to reverse the color palette. The default is F.

addblack

A boolean(T, F) indicator if want to add black to the color palatte. The default is F.

n

An optional numeric value specifying the number of discrete colors to include in the palette.

colors

An optional character vector of colors to use.

Value

A ggplot theme object

Author(s)

Alex Hubbard (hubbard.alex@gmail.com)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
library(ggplot2)
ggplot(iris) +
  ggtitle("Title", subtitle = "Subtitle") +
  geom_point(aes(x = Sepal.Width, y = Sepal.Length, color = Species), size = 4) +
  od_theme()

ggplot(iris) +
  ggtitle("Title", subtitle = "Subtitle") +
  geom_point(aes(x = Sepal.Width, y = Sepal.Length, color = Species), size = 4) +
  od_theme(n = length(unique(iris$Species)))

ggplot(iris) +
  ggtitle("Title", subtitle = "Subtitle") +
  geom_point(aes(x = Sepal.Width, y = Sepal.Length, color = Species), size = 4) +
  od_theme(colors = c("turquoise", "citrine", "iris"))

opendoor-labs/projectmap documentation built on Oct. 8, 2019, 1:58 p.m.