如何在gplots :: heatmap.2()中减小列名与X轴标签之间的距离

时间:2019-07-24 04:32:15

标签: r heatmap

我有以下代码:

  my_palette <- colorRampPalette(rev(RColorBrewer::brewer.pal(11, "RdBu")))(n = 50)
  par(mar = c(7, 4, 4, 2) + 0.1)
  gplots::heatmap.2(as.matrix(mtcars),
    Colv = TRUE,
    Rowv = TRUE,
    col = my_palette,
    density.info = "none",
    key = TRUE,
    scale = "none",
    ylab = "Y_LABEL",
    xlab = "X_LABEL",
    trace = "none",
    margins = c(12, 8))

它产生了这个情节:

enter image description here

如上所示,“ X_LABEL”与列名之间的距离 太远了。我该如何减少呢?

0 个答案:

没有答案