ggColours: Get default ggplot2/Seurat colours

Description Usage Arguments Value References Examples

View source: R/utils_plotting.R

Description

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

Usage

1

Arguments

n

Number of colours to return

Value

Named character vector, where names are the names of clusters, from 0 to n-1, and values are the hex codes for the colours.

References

https://stackoverflow.com/a/8197703

Examples

1
2
n_clust <- 5
ggColours(n_clust)

fungenomics/cytobox documentation built on Feb. 13, 2020, 10:51 a.m.