Say I have a simple matrix A generated by
A = matrix(c(1,2,3,4,5,6,7,8,9),nrow=3,ncol=3)
Now, my goal is to make a heatmap out of A, such that each number is replaced by a colour field. How to do that? I tried
heatmap(A)
but it produced three coloured stripes instead of 9 distinct fields.