Dear R users,

Please consider the following example:

tmp <- matrix(rnorm(100),10,10)
tmp[upper.tri(tmp, diag = TRUE)] <- NA
heatmap(tmp, col = heat.colors(200), Rowv=NA, Colv=NA)

I have three questions:

(1) How would I change the axis labels from 1:10 to c("apples", "pears", 
"bananas", "kiwis", "watermelons", "grapefruits", "strawberries", 
"blueberries", 
"cherries", "grapes")?

(2) How would I put the axis labels to the top and right, rather than on the 
bottom and left?

(3) How would I add a key (with the appropriate color ramp) to the bottom right 
corner of the graph? (I recognize that this can be done with the "Key = TRUE" 
option of the heatmap.2 function in the gplots package, but I want to use that. 
I want to make the key myself so that I can fully customize it.)

Thank you all very much in advance.
Josh Banta, Ph.D
Center for Genomics and Systems Biology
New York University
12 Waverly Place
New York, NY 10003

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to