热图图中的重叠标签
我正在通过COOCCUR
软件包生产热图,但我得到了重叠的物种名称。如何解决? 该图是由以下代码生成的:
M <- cooccur(mat = M, type = "spp_site", thresh = T, spp_names = TRUE, prob = "hyper")
plot(M, plotrand = TRUE)
I am producing a heatmap via cooccur
package but I am getting overlapping species names. How to solve it?
The plot was produced by the following codes:
M <- cooccur(mat = M, type = "spp_site", thresh = T, spp_names = TRUE, prob = "hyper")
plot(M, plotrand = TRUE)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不幸的是,作者没有在功能中使用定义的主题。在这篇文章中如何更改R图表中的默认字体大小 @gregor Thomas给出一个很好的答案。您可以做的是创建自己的
主题
,例如ggplot
。在这里,我将finches
数据集用作示例:output:
我建议使用
ggplot 。这是一个很好的帖子,可以肯定可以帮助您:更改ggplot2中轴文本的字体大小和方向
Unfortunately, the author didn't use defined themes inside the function. In this post How to change default font size in R chart @Gregor Thomas give a nice answer. What you can do is create your own
theme
like inggplot
. Here I use thefinches
dataset as an example:Output:
I would suggest playing around with the
theme
options fromggplot
. Here is a good post which can help you for sure: Changing font size and direction of axes text in ggplot2在开始使用字体尺寸的情况下,您应该检查这是否仅是由R错误猜测设备尺寸引起的人为问题。我已经注意到,当绘图通过
dev.copy.copy
保存到PDF时,这会定期发生,以下变方法始终为我解决问题:Before you start fiddling with font sizes, you should check whether this is just an artificial problem caused by R incorrectly guessing the device size. I have noticed that this regularly occurs when a plot is saved to PDF with
dev.copy
and the following workaround always solved the problem for me: