revgray {broman}R Documentation

Create vector of colors from white to black

Description

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

Usage

revgray(n = 256, ...)

Arguments

n

Number of colors.

...

Passed to grDevices::gray().

Details

There's not much to this. It's just ⁠gray((n:0)/n))⁠

Value

Vector of colors, from white to black

See Also

grDevices::gray()

Examples

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


[Package broman version 0.80 Index]