Jon
Jon

Reputation: 41

Plotting vectors in a constrained ordination without labels

I would like to plot vectors from a capscale ordination using VEGAN. I am familiar with the display ="bp" command, but this adds labels that are obscured by site points. Is there an easy means of removing these? I am happy to add them in later i.e. once exported and within word for publication.

My code thus far is as follows:

plot(mod, scaling = 3, type="n")
     with(data, points(mod, display="sites", cex=Pointsize,   
     pch=ifelse(Cat=="Reference",21,19)) ,bg=Cat,)
     with(data,text(mod,display="bp"))

Help will be appreciated

Upvotes: 4

Views: 1276

Answers (1)

Gavin Simpson
Gavin Simpson

Reputation: 174813

Use the points() method instead of the text() method:

points(mod, display = "bp")

(There also should be no need for the with(data) in that last line of code you show.)

Here is a reproducible example:

require(vegan)
data(varespec)
data(varechem)
ord <- cca(varespec ~ ., data = varechem)
plot(ord, type = "n", display = "sites")
points(ord, display = "sites")
points(ord, display = "bp")

enter image description here

Upvotes: 2

Related Questions