将标签插入到NA的矢量中并将其传递给labCol
参数。
library(gplots)
m <- matrix(rnorm(1000), ncol=100)
labvec <- c(rep(NA, 100))
labvec[c(1,20,40,60,80,100)] <- c(1,20,40,60,80,100)
heatmap.2(m, trace="none", Rowv = T, Colv = F, labCol = labvec, srtCol = 0)
srt
参数也可用于将标签水平转动。