我正在尝试减小热图的大小.2颜色键
现在就像这样
key=T, # add the key color
key.title =NA,
cexRow = 0.75,
cexCol=0.75,
我想减少它的高度并变得像这样
这就是我绘制热图的方法
heatmap.2(mat_data,
key=T, # add the key color
key.xlab="label",
key.title =NA,
cexRow = 0.75,
cexCol=0.75,
#lhei = c(5,5),
#cellnote = mat_data, # will display the values
main = "title to be shonwn ", # heat map title
#notecol=NA, # change font color of cell labels to black
density.info="none", # turns off density plot inside color legend
trace="none", # turns off trace lines inside the heat map
margins =c(15,20), # widens margins around plot
col=myPalette, # use on color palette defined earlier
breaks=col_breaks, # enable color transition at specified limits
dendrogram="row", # only draw a row dendrogram
Colv="NA",
notecex=1.0)
我找到了
密钥大小= 1
可以根据您的需要调整大小来改变大小
答案 0 :(得分:3)
可以使用lhei
heatmap.2()
参数进行设置
heatmap.2(data,lhei = c(1,7))
参数是长度为2的向量,看起来是键和热图的相对高度。