首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >带有vegan::ordispider的标签的位置

带有vegan::ordispider的标签的位置
EN

Stack Overflow用户
提问于 2013-05-16 16:42:05
回答 2查看 2.6K关注 0票数 1

我在用纯素食者做DCA的圣职。我想要显示我的分组站点,但是当我使用ordispider时,分组的标签相互隐藏。我如何调整他们的位置?是否可以以某种方式使用orditkplot?

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2013-05-17 06:34:22

不,这是不可能的orditkplot()ordispider(),它只是不知道如何处理这样的任意绘图函数。

您没有说明为什么要使用ordispider()在DCA排序中显示您的分组站点?您不需要将它们加入到某个质心或类似的位置来表示组成员身份。相反,您可以使用绘图符号来区分组,例如

代码语言:javascript
复制
require("vegan")
data(dune)
data(dune.env)

mod <- decorana(dune)

plot(mod, display = "sites", type = "n")

## colour & shape according to Management
col <- c("red","orange","forestgreen","navy")
pch <- 1:4
## add the points
with(dune.env,
     points(mod, display = "sites", col = col[Management],
            pch = pch[Management]))
## add a legend
legend("topright",
       legend = with(dune.env, levels(Management)),
       col = col, pch = pch, title = "Management",
       bty = "n")

或者,我认为您可以在没有标签的情况下绘制,并在以后添加它们,也许可以使用locator()来标识要放置标签的绘图的清晰区域,例如:

代码语言:javascript
复制
plot(mod, display = "sites", type = "p")
with(dune.env, ordispider(mod, groups = Management, col = "red"))
## select 4 locations
coords <- locator(with(dune.env, length(levels(Management))))

## now you have to click on the plot where you want the labels
## automagically finishes after you click the 4th label in this case

## draw labels
text(coords, labels = with(dune.env, levels(Management)))
票数 1
EN

Stack Overflow用户

发布于 2013-05-16 19:44:50

您是否尝试过在vegan vignette中执行以下操作

代码语言:javascript
复制
2.1. Cluttered plots
Ordination plots are often congested: there is a large number of sites and species, and it may be impossible to display all clearly. In particular, two or more species may have identical scores and are plotted over each other. Vegan does not have (yet?) automatic tools for clean plotting in these cases, but here some methods you can try:
- Zoom into graph setting axis limits xlim and ylim. You must typically set both, because
vegan will maintain equal aspect ratio of axes.
- Use points and add labell only some points with identify command.
- Use select argument in ordination text and points functions to only show the specied
items.
- Use ordilabel function that uses opaque background to the text: some text labels will
be covered, but the uppermost are readable.
- Use automatic orditorp function that uses text only if this can be done without overwriting
previous labels, but points in other cases.
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/16582756

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档