Discrete zodiac colors

scale_color_zodiac(..., use_factor_order = FALSE)

Arguments

...

Extra parameters to pass to ggplot2::discrete_scale() when use_factor_order is FALSE (default).

use_factor_order

A logical. If TRUE, this will assign colors based on how they match with the zodiac sign. If FALSE (default) then the colors will be used without looking for zodiac sign values.

Examples

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()