revgray: Create vector of colors from white to black

View source: R/revgray.R

revgrayR 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())


broman documentation built on May 29, 2024, 7:18 a.m.

Related to revgray in broman...