# NOT RUN {
# Generate a matrix, flip it, and plot it with a legend
data <- matrix(rnorm(50), nrow=10, ncol=5)
cols <- heat.colors(12)[12:1]
par(mar=c(5.1, 4.1, 4.1, 4.1))
image(t(data)[,nrow(data):1], col=cols)
heat_legend(data, cols); box(lwd=2)
# }
Run the code above in your browser using DataLab