[R] vegan NMDS labels
Sibylle Stöckli
sibylle.stoeckli at gmx.ch
Fri Dec 9 19:20:25 CET 2016
Dear R users
Does anybody know how it may be possible to plot the labels of a ordihull function separately (in R vegan)? We have studied the bee community in 5 different habitat types. As you see from the code, we use different point types (pch) and line types (lty). This is only possible if we change the habitat from character to integer. However, we prefer to show the labels as characters and not as integers 1-5? Furthermore, does anybody now how to plot the labels at the border and not in the centroid of the polygon (due to overlapping polygons it is not easy to assign them to the right polygon)?
Many thanks
Sibylle
### NMDS code ####
example_NMDS=metaMDS(community_matrix, # Our community-by-species matrix
distance = "bray", k=2) # The number of reduced dimensions
stressplot(example_NMDS)
ordiplot (example_NMDS, display = 'species', type = 'n', xlim=c(-0.5,0.5), ylim=c(-0.7,0.7))
HabTyp<-as.integer(S1$H_Aggregat1) # 5 different habitats.
points (example_NMDS, col="black", pch = HabTyp)
for (i in unique (HabTyp)) ordihull (example_NMDS, groups = HabTyp, show.group = i, draw = 'polygon', label=T, cex=1.5, lty=i)
[[alternative HTML version deleted]]
More information about the R-help
mailing list