R/plot.isomap.R

`plot.isomap` <-
    function (x, net = TRUE, n.col = "gray", type = "points", ...) 
{
    type <- match.arg(type, c("points", "text", "none"))
    if (!net) {
        pl <- ordiplot(x, display="sites", type = type, ...)
    } else {
        pl <- ordiplot(x, display = "sites", type = "none", ...)
        z <- scores(pl, "sites")
        k <- x$net
        segments(z[k[,1],1], z[k[,1],2], z[k[,2],1], z[k[,2],2], col=n.col)
        if (type == "points")
            points(pl, "sites", ...)
        else if (type == "text")
            ordilabel(pl, ...)
    }
    invisible(pl)
}

Try the vegan package in your browser

Any scripts or data that you put into this service are public.

vegan documentation built on May 2, 2019, 5:51 p.m.