m <- outer(1:10,1:10)
m
pimage(m)
pimage(m, col = greys(100, power = 2))
pimage(m, col = greys(100, bias = 2))
pimage(m, col = bluered(100))
pimage(m, col = bluered(100, power = .5))
pimage(m, col = bluered(100, bias = 2))
pimage(m - 25, col = greenred(20, bias = 2))
## choose your own color palettes
library(colorspace)
hcl_palettes(plot = TRUE)
## blues (with 20 shades)
pimage(m,
col = colorspace::sequential_hcl(20, "Blues", rev = TRUE))
## blue to green (aka "Cork")
pimage(m,
col = colorspace::diverging_hcl(100, "Cork"))
Run the code above in your browser using DataLab