Description Usage Arguments Examples
Function to extract DGI colors as hex codes.
1 |
... |
Character names of DGI colors. Any combination of "teal", "light grey", "black", "blue", "sea green", "white", "red", "brown", "chestnut", "yellow", "violet", "orange", "purple", "pastel red", "lapis lazuli", "hansa yellow", or "dark liver". By default, returns all colors in a vector. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | library(ggplot2)
ggplot(mtcars, aes(hp, mpg)) +
geom_point(size = 4, color = dgi_colors("teal")) +
theme_minimal()
ggplot(mtcars, aes(hp, mpg, color = factor(cyl))) +
geom_point(size = 4) +
scale_color_manual(values = dgi_colors()[1:3]) +
theme_minimal()
ggplot(mtcars, aes(hp, mpg, color = factor(cyl))) +
geom_point(size = 4) +
scale_color_manual(values = dgi_colors("teal", "light grey", "black")) +
theme_minimal()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.