knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "figure/", fig.height = 1 )
devtools::install_github("kmwest/SRI")
library(SRI) # See palette options names(sri_palettes)
sri_palette("sricool")
sri_palette("srisunset")
sri_palette("srioranges")
sri_palette("sriblues")
sri_palette("sricolors")
sri_palette("sricolors2")
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")
library("ggplot2") ggplot(iris, aes(Sepal.Length, Sepal.Width, color = Species)) + geom_point(size = 3) + theme_sri() + scale_color_manual(values=sri_palette("sricool"))
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.