broman (version 0.70-4)

revgray: Create vector of colors from white to black

Description

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

Usage

revgray(n = 256, ...)

Arguments

n

Number of colors.

...

Value

Vector of colors, from white to black

Details

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

See Also

grDevices::gray()

Examples

Run this code
# NOT RUN {
x <- matrix(rnorm(100), ncol=10)
image(x, col=revgray())

# }

Run the code above in your browser using DataLab