SIEI colors available through scale_fill_si
Arguments
- palette
Choose from 'si_palettes' list
- alpha
sets transparency of each color
- discrete
whether to use a discrete colour palette
- reverse
if TRUE, reverses order of palette
- ...
additional arguments to pass to scale_color_gradientn
Examples
if (FALSE) {
library(ggplot2)
library(tibble)
library(sf)
library(rnaturalearth)
library(glitr)
library(systemfonts)
ggplot(diamonds) +
geom_bar(aes(x = cut, fill = clarity)) +
scale_fill_si("genoas", discrete = T)
rnaturalearth::ne_countries(continent = "africa", returnclass = "sf") %>%
add_column(runif = runif(nrow(.))) %>%
ggplot() +
geom_sf(aes(fill = runif), color = "white", size = 0.25) +
scale_fill_si("old_roses", reverse = T) +
si_style_void()
}