scale_color_si: scale_color_si

View source: R/si_helpers.R

scale_color_siR Documentation

scale_color_si

Description

SIEI colors available through scale_color_si

Usage

scale_color_si(
  palette = "hunter_c",
  alpha = 1,
  discrete = FALSE,
  reverse = FALSE,
  ...
)

Arguments

palette

Choose from 'si_palettes' list

alpha

sets transparency of each color

discrete

whether to use a discrete color palette

reverse

if true, reverses the order of palette

...

additional arguments to pass to scale_color_gradientn

Details

siei color scales for ggplot2

Examples

## Not run: 
library(ggplot2)
library(glitr)

# Apply palettes to discrete or continuous colors
ggplot(diamonds) +
geom_point(aes(x = carat, y = price, color = cut)) +
scale_color_si("hunter_c", discrete = T)

ggplot(diamonds) +
geom_point(aes(x = carat, y = price, color = price)) +
scale_color_si("hunter_c")
## End(Not run)


USAID-OHA-SI/glitr documentation built on July 5, 2024, 3:24 p.m.