Skip to content

Commit

Permalink
Merge branch 'plot-metaMDS-cex'
Browse files Browse the repository at this point in the history
  • Loading branch information
jarioksa committed Aug 8, 2024
2 parents 8a1e228 + 27479a7 commit 71f2360
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
3 changes: 2 additions & 1 deletion R/ordiArgAbsorber.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
### List non-graphical arguments used in vegan plot commands
`ordiArgAbsorber` <- function(..., shrink, origin, scaling, triangular,
display, choices, const, truemean, optimize, FUN)
display, choices, const, truemean, optimize,
arrows, FUN)
match.fun(FUN)(...)
14 changes: 8 additions & 6 deletions R/plot.decorana.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
if (missing(xlim)) xlim <- range(sp.x, st.x)
if (missing(ylim)) ylim <- range(sp.y, st.y)
})
plot(sites, type = "n", xlim = xlim, ylim = ylim, asp = 1,
...)
ordiArgAbsorber(sites, type = "n", xlim = xlim, ylim = ylim, asp = 1,
FUN = plot, ...)
if (origin) {
abline(h = 0, lty = 3)
abline(v = 0, lty = 3)
Expand All @@ -62,13 +62,15 @@
}
if (type != "none" && (display == "both" || display == "sites")) {
if (type == "text" && !is.null(sitnam))
text(sites, sitnam, cex = cex, col = cols[1])
else points(sites, cex = cex, col = cols[1])
text.ordiplot(sites, what="sites", labels=sitnam, cex = cex,
col = cols[1], ...)
else points.ordiplot(sites, cex = cex, col = cols[1], ...)
}
if (type != "none" && (display == "both" || display == "species")) {
if (type == "text" && !is.null(spenam))
text(specs, spenam, cex = cex, col = cols[2])
else points(specs, pch = "+", cex = cex, col = cols[2])
text.ordiplot(specs, what="species", labels=spenam, cex = cex,
col = cols[2], ...)
else points.ordiplot(specs, pch = "+", cex = cex, col = cols[2], ...)
}
out <- list(sites = sites, species = specs)
class(out) <- "ordiplot"
Expand Down
4 changes: 2 additions & 2 deletions R/plot.metaMDS.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
`plot.metaMDS` <-
function (x, display = c("sites","species"), choices = c(1, 2), type = "p",
shrink = FALSE, ...)
shrink = FALSE, cex = 0.7, ...)
{
x <- scores(x, display = display, choices = choices, shrink = shrink)
ordiplot(x, display = display, type = type, ...)
ordiplot(x, display = display, type = type, cex = cex, ...)
}

0 comments on commit 71f2360

Please sign in to comment.