intpalette(c("white", "black"), n = 10)
grey(seq(1, 0, length.out = 10))
image(matrix(nrow = 1,ncol = 100, data = 1:100),
col = intpalette(c("red", "blue"), numcol = 100),
main = "intpalette")
image(matrix(nrow = 1, ncol = 100, data = 1:100),
col = intpalette(c("red", "blue", "yellow"), numcol = 100),
main = "intpalette")
Run the code above in your browser using DataLab