## swatches of several palette vectors
swatchplot(
"Hue" = sequential_hcl(5, h = c(0, 300), c = c(60, 60), l = 65),
"Chroma" = sequential_hcl(5, h = 0, c = c(100, 0), l = 65, rev = TRUE, power = 1),
"Luminance" = sequential_hcl(5, h = 260, c = c(25, 25), l = c(25, 90), rev = TRUE, power = 1),
off = 0
)
## swatches of named palette matrices
bprg <- c("Blues", "Purples", "Reds", "Greens")
swatchplot(
"Single-hue" = t(sapply(paste(bprg, 2), sequential_hcl, n = 7)),
"Single-hue (advanced)" = t(sapply(paste(bprg, 3), sequential_hcl, n = 7)),
"Multi-hue (advanced)" = t(sapply(bprg, sequential_hcl, n = 7)),
nrow = 5
)
## swatches with color vision deficiency emulation
swatchplot(sequential_hcl(7, "Viridis"), cvd = TRUE)
swatchplot(
"YlGnBu" = sequential_hcl(7, "YlGnBu"),
"Viridis" = sequential_hcl(7, "Viridis"),
cvd = c("deutan", "desaturate")
)
Run the code above in your browser using DataLab