我在用纯素食者做DCA的圣职。我想要显示我的分组站点,但是当我使用ordispider时,分组的标签相互隐藏。我如何调整他们的位置?是否可以以某种方式使用orditkplot?
发布于 2013-05-17 06:34:22
不,这是不可能的orditkplot()与ordispider(),它只是不知道如何处理这样的任意绘图函数。
您没有说明为什么要使用ordispider()在DCA排序中显示您的分组站点?您不需要将它们加入到某个质心或类似的位置来表示组成员身份。相反,您可以使用绘图符号来区分组,例如
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()来标识要放置标签的绘图的清晰区域,例如:
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)))发布于 2013-05-16 19:44:50
您是否尝试过在vegan vignette中执行以下操作
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.https://stackoverflow.com/questions/16582756
复制相似问题