colorVal: Colors Based on Values

Description Usage Arguments See Also Examples

View source: R/colorVal.R

Description

Assign a range of unique colors based on values.

Usage

1
colorVal(x, n = 100, low = 4/6, high = 0/6)

Arguments

x

A numeric vector of values on which the colors are based.

n

A numeric scalar giving the number of unique colors in the palette, default 100.

low

A numeric scalar giving the hue in [0, 1] at which the color palette begins for low values, default 4/6 for blue.

high

A numeric scalar giving the hue in [0, 1] at which the color palette ends for high values, default 0 for red.

See Also

rainbow

Examples

1
2
rand <- rnorm(20)
plot(rand, rand, pch=16, col=colorVal(rand))

JVAdams/EchoNet2Fish documentation built on Feb. 15, 2021, 4:27 a.m.