powered by
Calls grDevices::gray() then base::rev()
grDevices::gray()
base::rev()
revgray(n = 256, ...)
Vector of colors, from white to black
Number of colors.
Passed to grDevices::gray().
There's not much to this. It's just gray((n:0)/n))
gray((n:0)/n))
x <- matrix(rnorm(100), ncol=10) image(x, col=revgray())
Run the code above in your browser using DataLab