簡體   English   中英

如何在heatmap.3中調整列標簽

[英]How to adjust column labels in heatmap.3

以下是我的heatmap.3代碼:

heatmap.3(x = as.matrix(res), dist.FUN = dist2, scale = 'row', color.FUN = col_ylgnbu, 
                           cex.main = 2, trace = 'none', srtCol = 45, adjCol = c(1,0.1),
                           main = paste(title), 
                           key = T, cexRow = 2, cexCol = 1)

我使用此代碼獲得以下熱圖:

在此處輸入圖片說明

我的問題是如何調整列標簽,使其不與熱圖重疊?

謝謝!

您可以將adjCol設置為居中對齊,將offsetCol設置為向下移動標簽:

heatmap.3(x = as.matrix(res), dist.FUN = dist2, scale = 'row', 
    color.FUN = col_ylgnbu, 
    cex.main = 2, trace = 'none', srtCol = 45, 
    adjCol = c(1,0), offsetCol=1
    main = paste(title), 
    key = T, cexRow = 2, cexCol = 1)

此處有更多注釋: http : //earlglynn.github.io/RNotes/package/gplots/heatmap2.html

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM