Description Usage Arguments Examples
Discrete zodiac colors
1 | scale_color_zodiac(..., use_factor_order = FALSE)
|
... |
Extra parameters to pass to |
use_factor_order |
A logical. If |
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 26 27 28 | library(dplyr)
library(ggplot2)
## Use colors that match with each zodiac sign
sample_dates %>%
mutate(
zodiac_sign = zodiac_sign(date)
) %>%
ggplot() +
aes(
x = x,
y = y,
color = zodiac_sign
) +
geom_point() +
## Set use_factor_order = TRUE
scale_color_zodiac(use_factor_order = TRUE)
## Use the colors in the palette without zodiac signs
iris %>%
ggplot() +
aes(
x = Sepal.Length,
y = Sepal.Width,
color = Species
) +
geom_point() +
scale_color_zodiac()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.