标签: r bioinformatics heatmap
我正在绘制热图,我不希望行名和列名在x和y轴上可见。
所以我使用了以下代码:
heatmap.2(data, xlab="PROTEINS", ylab="DRUGS", labRow=FALSE, labCol = FALSE)
然后,热图与每个轴上的PROTEINS和DRUGS标签之间有一个很大的空间。
PROTEINS
DRUGS
答案 0 :(得分:7)
尝试使用margin参数。添加如下内容:
#dummy data x <- as.matrix(mtcars) heatmap.2(x, xlab = "PROTEINS", ylab = "DRUGS", labRow = FALSE, labCol = FALSE, main = "Without xy names") heatmap.2(x, xlab = "PROTEINS", ylab = "DRUGS", labRow = FALSE, labCol = FALSE, margins = c(2, 2), main = "Without xy names, margin")