distinctColors: Generate a distinct palette for coloring different clusters.

Description Usage Arguments Value Examples

View source: R/plot.R

Description

Create a distinct palette for coloring different heatmap clusters. The function returns colors for input into ComplexHeatmap:Heatmap(), signatureGeneHeatmap() and signatureHeatmap().

Usage

1
2
3
4
5
6
distinctColors(
  n,
  hues = c("red", "cyan", "orange", "blue", "yellow", "purple", "green", "magenta"),
  saturation.range = c(0.7, 1),
  value.range = c(0.7, 1)
)

Arguments

n

an integer describing the number of colors to generate. Required.

hues

a vector of character strings indicating the R colors available from the colors() function. These will be used as the base colors for the clustering scheme. Different saturations and values (i.e. darkness) will be generated for each hue. Default is c("red", "cyan", "orange", "blue", "yellow", "purple", "green", "magenta")

saturation.range

a numeric vector of length 2 with values between 0 and 1 giving the range of saturation. The default is c(0.25, 1).

value.range

a numeric vector of length 2 with values between 0 and 1 giving the range of values. The default is c(0.5, 1).

Value

A vector of distinct colors that have been converted to HEX from HSV.

Examples

1

TBSignatureProfiler documentation built on Nov. 8, 2020, 6:56 p.m.