它是硬编码的。您需要在代码中更改它。它出现在绘制键的部分的中间,该行是:
else mtext(side = 1, "Value", line = 2)
这是创建键的 heatmap.2 代码部分(至少到出现“值”一词的位置):
if (key) {
par(mar = c(5, 4, 2, 1), cex = 0.75)
tmpbreaks <- breaks
if (symkey) {
max.raw <- max(abs(c(x, breaks)), na.rm = TRUE)
min.raw <- -max.raw
tmpbreaks[1] <- -max(abs(x), na.rm = TRUE)
tmpbreaks[length(tmpbreaks)] <- max(abs(x), na.rm = TRUE)
}
else {
min.raw <- min(x, na.rm = TRUE)
max.raw <- max(x, na.rm = TRUE)
}
z <- seq(min.raw, max.raw, length = length(col))
image(z = matrix(z, ncol = 1), col = col, breaks = tmpbreaks,
xaxt = "n", yaxt = "n")
par(usr = c(0, 1, 0, 1))
lv <- pretty(breaks)
xv <- scale01(as.numeric(lv), min.raw, max.raw)
axis(1, at = xv, labels = lv)
if (scale == "row")
mtext(side = 1, "Row Z-Score", line = 2)
else if (scale == "column")
mtext(side = 1, "Column Z-Score", line = 2)
else mtext(side = 1, "Value", line = 2)
.... lots more code below
您应该键入heatmap.2
,然后将源代码复制到编辑器,然后使用搜索功能查找“值”。将“值”更改为其他内容(用引号括起来),然后键入heatmap.2 <-
并粘贴代码并按回车键。(除非您保存它,否则它只会在会话继续时持续存在。)