By using the command:
heatmap.2(exp, col = greenred(100), scale="none", ColSideColors = Carcolors,
# dendrogram = "row",
key=T, symkey=FALSE, density.info="none", trace="none", cexRow=1, cexCol=0.9)
The heatmap2 plots “samples” as columns and variables as rows. How can I rotate the heatmap counterclock wise 90 degree so the sample names are listed on the right and variables are listed on the top (with RowSideColors on the right also)? Thanks!
I am not sure if I understand you right, but does a tranpose of your matrix do the job?
Here is an example: