pheatmap中的自定义轴标签和图例位置

时间:2015-12-20 10:13:46

标签: r heatmap pheatmap

我想将自定义轴放在pheatmap pheatmap包中。我尝试了xlab="Custom x label"ylab="Custom y label",但它没有用。我也想不出如何改变传奇的位置。

最低工作示例:

library(pheatmap)
# Create test matrix
test = matrix(rnorm(200), 20, 10)
test[1:10, seq(1, 10, 2)] = test[1:10, seq(1, 10, 2)] + 3
test[11:20, seq(2, 10, 2)] = test[11:20, seq(2, 10, 2)] + 2
test[15:20, seq(2, 10, 2)] = test[15:20, seq(2, 10, 2)] + 4
colnames(test) = paste("Test", 1:10, sep = "")
rownames(test) = paste("Gene", 1:20, sep = "")

# Draw heatmaps
pheatmap(test)

pheatmap(test, xlab = "Custom x label", ylab = "Custom y label")

enter image description here

0 个答案:

没有答案