# NOT RUN {
####=========================================####
####=========================================####
data(my.colors)
set.seed(1234)
palette <- sample(my.colors, 16) # sample some
palette2 <- transp(palette) # make them transparent
ma <- matrix(1:16,4,4)
layout(matrix(1:2,1,2))
image(ma, col=palette)
image(ma, col=palette2)
layout(matrix(1,1,1))
####=========================================####
####=========================================####
# }
Run the code above in your browser using DataLab