在r pheatmap中更改图例大小的问题

问题描述

有人知道如何调整间隔图例的大小吗?因为无论我尝试什么,它都不会变小,我知道它应该可以。我正在使用pheatmap()

enter image description here

这是我的代码:

library(pheatmap)
library(grid)

all_data2 <- cbind(amino,sphingo,hexoses,phospha,lyso,acyl)
matrix_data <- as.matrix(amino[,3:31])
rownames(matrix_data) <- sample_id$`Sample Identification`
heatmap_final <- matrix_data[,!colnames(matrix_data) %in% c('Sample Identification.1','Sample Identification.2','Sample Identification','Time point.1','Time point.2','Time point','Taurine','Putrescine','Phe','Trp','Tyr','Thr','alpha-AAA','Kynurenine','Creatinine','Met','Ile','Leu','')]



all_data2 = data.frame("Time point" = c(rep("T0",45),rep("T1",45)))
rownames(all_data2) = rownames(heatmap_final) # name matching

heatmap_final[order(colnames(heatmap_final)),order(colnames(heatmap_final))]



pheatmap(
 mat = t(log2(heatmap_final)),scale = "row",annotation_col = all_data2,cluster_cols = F,treeheight_row = 30,legend = TRUE,show_rownames = TRUE,cellwidth = 3,cellheight = 6,drop_levels = TRUE,fontsize = 3,clustering_method = "complete",main = "Hierachical Cluster Analysis"
)



解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...