Skip to content

returning site and species coordinates in NMDS using vegan

7 messages · L Quinn, Victor L. Landeiro, Cliff Beall +2 more

#
On Tue, 2011-09-20 at 20:54 +0000, L Quinn wrote:
Why don't you tell use what you want to do to produce a plot that will
meet the reviewers/editors requirements? That way we can help you with R
code to do the plot as I am 100% certain you won't be able to do a
better job with Excel.

Yes, I am that confident! I've published umpteen papers using vegan
plots, that with a bit of crafting haven't had any problems getting past
reviewers/editors of the ecological/environmental journals I have
published in.

G
#
The site coordinates are in spp.mds$points and the species coordinates are in spp.mds$species

I have used those to make bubble plots, scaling the size of points by species abundance. I got the idea from PRIMER and extended it with R.

I use the R graphics though, I think they are very flexible.
On Sep 20, 2011, at 4:54 PM, L Quinn wrote:

            
#
Hi Lauren,
type
?plot
or ?par
and you will find several possibilities to change the view of your plot (most of them works in plot.cca to! It is a little bit tricky, but once you understood it, it will be much more easier and faster to build very nice plots in R as if you want to do the same in EXCEL or Power Point ( Power Point: Export the Graph as emf file to Power Point, with a dubble click on the graph you can change whatever you want to change, or use text fields) ? and if you save the code for the plot, changes in the future can be done much more faster, as if you have to do all these things in other programs. 
http://addictedtor.free.fr/graphiques/ here you can find several ideas (with the R code) how flexible R graphics are 
Sven
#
On Tue, 2011-09-20 at 18:17 -0300, Victor L. Landeiro wrote:
I wanted to write that you can do this in a single call; but you can't.
You should be able to, so I'll take a look at scores.metaMDS and improve
it to work more like scores.cca for example.

G

  
    
#
On Tue, 2011-09-20 at 20:54 +0000, L Quinn wrote:
In anticipation of you telling us what you want to do, the general
advice is to plot aspects of the model fit by hand, in stages.

# The recommended way of running NMDS (Minchin 1987)
##
data(dune)
# Global NMDS using monoMDS
sol <- metaMDS(dune)

## extract scrs
sites <- scores(sol, display = "sites")
spps  <- scores(sol, display = "species")

## compute axis ranges
xlim <- range(sites[,1], spps[,1])
ylim <- range(sites[,2], spps[,2])

## set up a blank plotting window
plot(sol, type = "n", xlim = xlim, ylim = ylim)

## now do plotting with base R plotting functions, e.g.
points(sites, col = "blue", pch = 16, cex = 1.2)
text(spps, labels = rownames(spps), col = "red", cex = 0.6)

If it is the overlap of labels etc that is annoying you,
ordipointlabel() is your friend, or you can fiddle with things by hand
using orditkplot(), push the result back to R and then plot it using
ordiplot().

## try this:
ordipointlabel(sol)

The success of any of these will depend on the number of sites and
species etc. and their spacing in the ordination. orditkplot() provides
the most flexibility, but you have to move all the labels by hand.

G