knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "figure/",
  fig.height = 1
)

SRI Package (Themes and Color Palettes)

How to Install

devtools::install_github("kmwest/SRI")

Usage

library(SRI)

# See palette options
names(sri_palettes)

Available functions

Palettes

sricool

sri_palette("sricool")

srisunset

sri_palette("srisunset")

srioranges

sri_palette("srioranges")

sriblues

sri_palette("sriblues")

sricolors

sri_palette("sricolors")

sricolors2

sri_palette("sricolors2")

dcfscolors

This palette is based on the DCFS specified region colors. The palette is applied in alphabetical order; Eastern (green), Northern (red), Salt Lake Valley (orange), Southwest (blue), Western (yellow), and Statewide (purple).

sri_palette("dcfscolors")

Example

library("ggplot2")
ggplot(iris, aes(Sepal.Length, Sepal.Width, color = Species)) +
  geom_point(size = 3) + theme_sri() + scale_color_manual(values=sri_palette("sricool"))

Quick format

Note: Not currently working. Add +sribasic to your ggplot to apply a quick format. This applies theme_sri and sets scale color and fill to "sricolors". For example:

ggplot(iris, aes(Sepal.Length, Sepal.Width, color = Species)) +
  geom_point(size = 3) + sribasic


kmwest/SRI documentation built on May 28, 2019, 4:01 p.m.