Description Usage Arguments Value Examples
Colour palette functions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | pal_cool(n)
pal_heat_hcl(n)
pal_cool_hcl(n)
pal_pastels(n)
pal_blue2red(n)
pal_sea2sand(n)
pal_desert(n)
pal_green2brown(n)
pal_green2pink(n)
pal_grey(n)
pal_gray(n)
pal_namatjira(n)
pal_dark_rainbow(n)
|
n |
desired number of colours |
character string vector of colour strings
1 2 3 4 5 6 | barplot(1:15, fill = pal_sea2sand, colour = "red", axes = FALSE) -> bp
z <- complex(real = bp,imaginary = seq_along(bp))
points(z, xpd = NA)
arrows(z[-length(z)], z[-1], gap = 1.5, col = "black")
labels <- c("sea", gsub(" ", "0", format(2:14)), "sand")
text(z, labels, pos = 3, xpd = NA, col = pal_blue2red(15))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.