1

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")

在此处输入图像描述

4

0 回答 0