What function can I use to emulate ggplot2's default color palette for a desired number of colors. For example, an input of 3 would produce a character vector of HEX colors with these colors:
R – Emulate ggplot2 default color palette
ggplot2r
Related Topic
- R – Grouping functions (tapply, by, aggregate) and the *apply family
- R – How to change the background color of a plot made with ggplot2
- R – How to assign colors to categorical variables in ggplot2 that have stable mapping
- R – Increase number of axis ticks
- Postgresql – Postgres not returning lastval() properly
Best Answer
It is just equally spaced hues around the color wheel, starting from 15:
For example: