Description Usage Arguments Value References Examples
View source: R/utils_plotting.R
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.)
1 | 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
1 2 | n_clust <- 5
ggColours(n_clust)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.