Not my function but it is useful so here it is! Origin
Arguments
- n
Number of colour groups
Value
Returns a vector representing the default colour codes assigned to each group by ggplot.
See also
Link for executed Examples which includes any figure outputs.
Examples
# Get colour codes used for 6 categorical groups
GG_Colour_Hue(6)
#> [1] "#F8766D" "#B79F00" "#00BA38" "#00BFC4" "#619CFF" "#F564E3"