heatmap.2() 覆盖 colname

发布于 2024-12-06 03:17:07 字数 259 浏览 1 评论 0原文

我正在 R 中使用函数 heatmap.2。我创建了一个具有以下条件的热图:

heatmap.2(tada1, Rowv=FALSE, Colv="FALSE", dendrogram='none', scale="row",trace='none',col=redgreen(3)) 

我的问题是热图的列包含 596 个名称。我看不到这些名称,因为它们互相覆盖。因此,我的问题是:如何显示所有名称而不互相覆盖?

谢谢!

I am using the function heatmap.2 in R. I created an heatmap with the following conditions:

heatmap.2(tada1, Rowv=FALSE, Colv="FALSE", dendrogram='none', scale="row",trace='none',col=redgreen(3)) 

My problem is that the column of the heatmap contains 596 names. I cant see this names because they are overwriting each other. My Question is therefore: How can i display all the names without overwriting each other?

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

只怪假的太真实 2024-12-13 03:17:07

我本来想说“使用 cex.axis 使字体大小更小”,但我看到代码中已经有规定可以使行和列标签按其数字比例变小。请参阅帮助页面上的参数列表:

       cexRow = 0.2 + 1/log10(nr),
       cexCol = 0.2 + 1/log10(nc),

...所以也许您只需要购买一个放大镜。或者:打印到较大的矢量图形设备并将其缩小。 (或者提供一个示例,以便我们了解您遇到的困难。

要实现我的倒数第二个建议,您可以使用 pdfviewer 查看此输出。这应该可以让您放大或缩小。

pdf(file="Hmap2.pdf", height=20, width=15)   
# will go to the working directory unless you use path
heatmap.2(tada1, Rowv=FALSE, Colv="FALSE", dendrogram='none', scale="row", 
            trace='none', col=redgreen(3)) 
dev.off()

I was going to say "Use cex.axis to make the font size smaller", but I see that there is already provision in the code to make the row and column labels smaller in proportion to their numbers. See the argument list on the help page:

       cexRow = 0.2 + 1/log10(nr),
       cexCol = 0.2 + 1/log10(nc),

... so maybe you just need to purchase a magnifying glass. Or: print to a vector graphics device that is larger and scale it down. (Or provide an example so we can see what difficulty you are experiencing.

To implement my second to last suggestion you could look at this output with a pdfviewer. That should let you zoom in or out.

pdf(file="Hmap2.pdf", height=20, width=15)   
# will go to the working directory unless you use path
heatmap.2(tada1, Rowv=FALSE, Colv="FALSE", dendrogram='none', scale="row", 
            trace='none', col=redgreen(3)) 
dev.off()
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文