我想将自定义轴放在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")