gpt4 book ai didi

r - R : Legend size and creating a square plot 中的 pheatmap 格式

转载 作者:行者123 更新时间:2023-12-04 16:10:28 25 4
gpt4 key购买 nike

Pheatmap 仅在 legend=FALSE 时创建方形图。我尝试使用 par() 来允许更多 oma() 和 mar() 空间,但没有运气。这个图例也很大,我找不到任何关于减少它或改变它的位置的文档。第一个图没有安装树状图,但这与尺寸问题无关。无论聚类如何,都会发生同样的情况。我会很感激任何意见

png(filename="tmpfile.png", width=1500, height=1500, res=500)
pheatmap(res, cluster_rows=FALSE, cluster_cols=FALSE, main="Default_clust", annotation=res2, color = rainbow(n, start=.7, end=.1), show_rownames=FALSE, show_colnames=FALSE, border_col=NA, fontsize=6)
dev.off()

Square plot with no legend plot has legend but is not square

最佳答案

关于平方图的问题实际上与绘制 Pearson 相关性非常相关。我来到这里希望得到答案,最后我想出了一个解决方法来手动设置单元格宽度,例如:

pheatmap(...,     
cellheight=3, cellwidth = 3)

但我想要一个更好的方法。

关于r - R : Legend size and creating a square plot 中的 pheatmap 格式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25495965/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com