我有一个包含 100 个物种的数据集,因此绘制起来非常糟糕。所以我想挑选出这些物种的一个子集并将它们绘制在 RDA 图中。我一直遵循这个 指南
代码如下所示:
## load vegan
require("vegan")
## load the Dune data
data(dune, dune.env)
## PCA of the Dune data
mod <- rda(dune, scale = TRUE)
## plot the PCA
plot(mod, scaling = 3)
## build the plot up via vegan methods
scl <- 3 ## scaling == 3
colvec <- c("red2", "green4", "mediumblue")
plot(mod, type = "n", scaling = scl)
with(dune.env, points(mod, display = "sites", col = colvec[Use],
scaling = scl, pch = 21, bg = colvec[Use]))
text(mod, display = "species", scaling = scl, cex = 0.8, col = "darkcyan")
with(dune.env, legend("topright", legend = levels(Use), bty = "n",
col = colvec, pch = 21, pt.bg = colvec))
这是你最终得到的情节。现在我真的很想从情节中删除一些物种,但不是分析。所以情节只显示了 Salrep、Viclat、Aloge 和 Poatri。
帮助表示赞赏。