Get evenly spaced colours from around the colour wheel, which are the default
colours assigned to clusters by Seurat. The output of this function can be
passed to the scale_colour_manual() and scale_fill_manual() functions
from ggplot2, as the values argument. (ggColors points
to this function.)
ggColours(n)
| n | Number of colours to return |
|---|
Named character vector, where names are the names of clusters, from 0 to n-1, and values are the hex codes for the colours.
https://stackoverflow.com/a/8197703
n_clust <- 5 ggColours(n_clust)#> 0 1 2 3 4 #> "#F8766D" "#A3A500" "#00BF7D" "#00B0F6" "#E76BF3"