Skip to content

Vegan: Diversity Plot, label points

2 messages · Alejo C.S., Gavin Simpson

#
Dear List,

I can'f figure how to add point labels in the next plot (example from
?taxondive help page):

library(vegan)
data(dune)
data(dune.taxon)
taxdis <- taxa2dist(dune.taxon, varstep=TRUE)
mod <- taxondive(dune, taxdis)
plot(mod)

The points in this plot are diversity values of single sites, and I'd
like to add a label to each one. The plot command don't accept a
"label" argument.
Any tip?

Thanks in advance.

Alejo
6 days later
#
On Wed, 2011-11-23 at 16:02 -0300, Alejo C.S. wrote:
A couple of options:

with(mod, text(Species, Dplus, label = rownames(dune), 
               pos = 2, cex = 0.7))

fiddle with pos - see ?text for details.

Another option is

with(mod, identify(Species, Dplus, label = rownames(dune), cex = 0.9))

where you now click around the points you want to label. See ?identify
for further details.

HTH

G