Learn R Programming

broman (version 0.84)

revrainbow: Create vector of colors from blue to red

Description

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

Usage

revrainbow(n = 256, ...)

Value

Vector of colors, from blue to red.

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

See Also

Examples

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

Run the code above in your browser using DataLab