[R-sig-eco] Bringing ordispider labels to the front of plot and decluttering
Thomas Parr
thomas.parr at maine.edu
Fri Jun 20 21:40:42 CEST 2014
I have the following code that creates an ordispider plot (adapted from:
http://r.789695.n4.nabble.com/Plotting-Ellipses-and-Points-of-Matching-Color
s-in-an-Ordination-td3731968.html). However, due to the plotting order in
the code the lines for HF fall atop the label for BF. How would I adjust
this so the labels are added after all the lines are added? Also, let's
assume the labels overlap. Is there a simple way to declutter the labels?
data(dune)
data(dune.env)
mod <- cca(dune ~ Management, dune.env)
attach(dune.env)
plot(mod, type="n")
points(mod, display="sites", pch=as.numeric(Management),
col=as.numeric(Management))
groupz <- sort(unique(Management))
for(i in seq(groupz)) {
ordispider(mod, Management,label=T, font=2, cex=1.5, col=i,
show.groups=groupz[i])
}
Thanks,
Thomas
More information about the R-sig-ecology
mailing list