[R-sig-eco] Fwd: metaMDS - avoid species overlap in plots

Gavin Simpson gavin.simpson at ucl.ac.uk
Thu Jul 19 18:13:40 CEST 2012


On Mon, 2012-06-25 at 16:46 +0200, Kay Cichini wrote:
> Hi!
> 
> library(vegan)
> data(dune)
> sol <- metaMDS(dune)
> 
> # use argument air! see ?orditorp:
> plot(sol, type = "n")
> orditorp(sol, displ = "sp", air = 1)
> 
> 
> # or use pointLabel() from maptools package. this should avoid overplotting
> of text -

To come to this late, but we have ordipointlabel() in vegan, which is
modelled on pointLabel() and aims to do the same thing without having to
rely upon the spatial stack. It also knows about ordination objects in
vegan.

G

> # here is an example where I added cex according to species frequencies.
> library(maptools)
> x = as.vector(sol$species[,1])
> y = as.vector(sol$species[,2])
> w = row.names(sol$species)
> cex.lab = colSums(dune > 0) / nrow(dune) + 1
> col.lab = rgb(0.2, 0.5, 0.4, alpha = 0.6)
> 
> plot(sol, type = "n")
> points(sol, displ = "species", cex = 1, pch = 4, col = 3)
> pointLabel(x, y, w, col = col.lab, cex = cex.lab)
> 
> 
> HTH,
> Kay
> 
> 
> 2012/6/25 Gian Maria Niccol Benucci <gian.benucci at gmail.com>
> 
> > Hi community,
> >
> > Very simple question. How to avoid overlap plot of species in a metaMDS()
> > diagram?
> >
> > I used this command...
> >
> > > text(metaMDS_new2, display=c("species"), cex=0.6)
> >
> > but some species are plotted one over the other and is not simple to read
> > the diagram.
> >
> > Thanks for helping,
> >
> > --
> > Gian
> >
> >        [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > R-sig-ecology mailing list
> > R-sig-ecology at r-project.org
> > https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
> >
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology

-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 Dr. Gavin Simpson             [t] +44 (0)20 7679 0522
 ECRC, UCL Geography,          [f] +44 (0)20 7679 0565
 Pearson Building,             [e] gavin.simpsonATNOSPAMucl.ac.uk
 Gower Street, London          [w] http://www.ucl.ac.uk/~ucfagls/
 UK. WC1E 6BT.                 [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%



More information about the R-sig-ecology mailing list