Description Usage Arguments Value Examples
Will return a function that returns the hex codes from the character vector provided. The names of the character vectors can be queried.
1 | get_hex(color_vec)
|
color_vec |
A named character vector with hex codes. |
A function from which the hex codes can be queried by typing their bare, unquoted name.
1 2 3 4 5 6 7 8 9 10 | milkmaid_hex <- get_hex(dutchmasters::dutchmasters$milkmaid)
milkmaid_hex(blue(skirt), yellow(buste))
library(ggplot2)
ggplot(data.frame(x = rnorm(100),
y = rexp(100),
z = rep(letters[1:2], 50)),
aes(x, y, col = z)) +
geom_point(size = 3) +
scale_color_manual(values = milkmaid_hex(blue(skirt), yellow(buste)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.