小编Eri*_*erg的帖子

将y轴标签移动到heatmap的左侧

我想将y轴标签移动到heatmap的左侧.(这与关于在热图上移动轴的问题类似,但不一样)虽然我可以通过编辑heatmap.2函数的第290行来移动轴,但是值会覆盖实际的热图.

if (is.null(srtRow) && is.null(colRow)) {
    axis(4, iy, labels = labRow, las = 2, line = -0.5 + offsetRow, 
         tick = 0, cex.axis = cexRow, hadj = adjRow[1], padj = adjRow[2])
  }

  else {

    if (is.null(srtRow) || is.numeric(srtRow)) {

      xpd.orig <- par("xpd")

      par(xpd = NA)
      ypos <- axis(4, iy, labels = rep("", nr), las = 2, #change
                   line = -0.5, tick = 0)
      text(x = par("usr")[2] + (1 + offsetRow) * strwidth("M"), 
           y = ypos, labels = labRow, adj = …
Run Code Online (Sandbox Code Playgroud)

axis margins heatmap

6
推荐指数
0
解决办法
1198
查看次数

标签 统计

axis ×1

heatmap ×1

margins ×1