get.distinct.cols: Return up to 22 distinct colours.

View source: R/NCmisc.R

get.distinct.colsR Documentation

Return up to 22 distinct colours.

Description

Useful if you want to colour 22 autosomes, etc, because most R colour palettes only provide 12 or fewer colours, or else provide, a gradient which is not distinguishable for discrete categories. Manually curated so the most similar colours aren't side by side.

Usage

get.distinct.cols(n = 22)

Arguments

n

number of unique colours to return

Value

returns vector of n colours

Author(s)

Nicholas Cooper njcooper@gmx.co.uk

Examples

get.distinct.cols(10)
plot(1:22,pch=19,col=get.distinct.cols(22))

NCmisc documentation built on Oct. 17, 2022, 5:09 p.m.