# various ways to label mds (or other ordination plots) # default labels of site and species names plot(fish.mds2,type='t') # more control over what is printed # setup the plot, but don't print anything plot(fish.mds2,type='n') # then add text. # text requires 3 arguments (x, y, text) text(fish.mds2$points[,1],fish.mds2$points[,2],spplist$nettype) # alternative route, using vegan functions mdsplot <- ordiplot(fish.mds2) # can also specify type = 'none', 'points', 'text' # use info in mdsplot object to make plots points(mdsplot, display='species', pch=19) # pch changes the plot character. see ?par for all the options text(mdsplot, display='sites') # the above 3 statements will draw nMDS plot of species, label sites w/names # something new, useful to identify sites, species, or label a few # draw a clean plot plot(fish.mds2, type ='n') # or use ordiplot to create mdsplot object identify(mdsplot, 'sites') # use mouse to select individual points. will be labelled # with site/species names, can specify new labels with # label=vector of names # identify() is also available in a non-vegan form # identify(x, y, labels) # draw convex hulls plot(fish.mds2,type='n', xlab='NMDS 1', ylab='NMDS 2') ordihull(fish.mds2,spplist$NETTYPE) # my function to plot labels at centroids of groups ordicentroid(fish.mds2,spplist$NETTYPE) # for demo, plot locations of points for one group points(fish.mds2$points[spplist$NETTYPE=='EF',]) title("Convex hulls") # or add ellipses plot(fish.mds2,type='n') ordiellipse(fish.mds2,spplist$NETTYPE) ordicentroid(fish.mds2,spplist$NETTYPE) points(fish.mds2$points[spplist$NETTYPE=='EF',])