问题描述
仅当Legend = FALSE时,热图才会创建正方形图.我尝试使用par()允许更多的oma()和mar()空间而没有运气.传说也确实很大,我找不到减少或改变其位置的任何文档.第一个图未安装树状图,但这与尺寸问题无关.无论群集如何,都会发生相同的情况.我将不胜感激
Pheatmap only creates a square plot when legend=FALSE. I have tried using par() to allow more oma() and mar() space without luck. The legend is also really big and i cannot find any documentation on reducing this or changing its position. The first plot doesn't have a dendrogram fitted but this is irrelevant to the sizing issue. The same happens regardless of the clustering. I would appreciate any comments
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()
推荐答案
关于平方图的问题实际上与绘制Pearson相关性非常相关.我来这里是为了寻求答案,最后我想出了一种解决方法,可以手动设置像元宽度,例如:
The question about square plot is actually quite relevant for plotting Pearson correlations. I came here hoping for an answer, in the end I came up with a workaround to set the cell width manually, eg:
pheatmap(...,
cellheight=3, cellwidth = 3)
但是我想要一个更好的方法.
But I would like a better way.
这篇关于R中的照片地图格式:图例大小并创建一个正方形图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!