revrainbow: Create vector of colors from blue to red

View source: R/revrainbow.R

revrainbowR Documentation

Create vector of colors from blue to red

Description

Calls grDevices::rainbow() then base::rev()

Usage

revrainbow(n = 256, ...)

Arguments

n

Number of colors.

...

Passed to grDevices::rainbow().

Details

There's not much to this. It's just rev(rainbow(start=0, end=2/3, ...)).

Value

Vector of colors, from blue to red.

See Also

base::rev(), grDevices::rainbow()

Examples

x <- matrix(rnorm(100), ncol=10)
image(x, col=revrainbow())


kbroman/broman documentation built on Feb. 11, 2024, 7:18 a.m.