Hi Andrew,
Here's some code that will accomplish this. I created an NMS
ordination, and the two-dimension plot scores are in object veg.2nms. I
had an object "env" with a variety of environmental variables, and I
used the do-loop to create an overlay graphic on the plot ordination
(using surf) for each variable. You can create an object called "env"
with your distance from lake shore data, and then create a surface
overlay for just that variable by eliminating the do-loop . The points
can be labelled according to the lake they came from by modifying the
legend code I used to identify the community type (from object
veg.flex.6) for each point.
## environmental variable overlay
attach(env)
par(ask=T)
for (i in 1:ncol(env)) {
plot(veg.2nms,pch=20, col=veg.flex.6)
tmp<-colnames(env[i])
title(tmp)
legend(-2.8,-0.7,c("high
marsh","grassland","beach","dune","thicket","low
marsh"),pch=20,col=c(1:6),bty="n")
surf(veg.2nms,env[,i])
}
I hope this is helpful.
Cheers, Tom Wentworth
On 11/18/2012 9:39 AM, Andrew Michelson wrote:
Dear EcoLoggers,
I am about to publish a paper, but the editors want me to redraft a figure
of a non-metric multidimensional scaling (NMDS) ordination with 2
categories for each point, rather than the one category I showed. Any
ideas the best way to do this? I use R, but prefer PAST to do NMDS.
Specifically, I sampled 16 communities in each of 7 seven lakes along a
transect into each lake. Originally, I colored each point to represent the
lake where the sample came from, but the editors want each point to
indicate the lake it came from *and* its distance from the lake shore on
the same NMDS ordination. Any ideas?
Thank you for your help,
Andrew Michelson
Postdoctoral Researcher
Department of Geology and Environmental Sciences
University of Akron
Akron, OH 44325-4101
(330) 634-7193
--
Thomas R. Wentworth, Ph.D.
Alumni Distinguished Undergraduate Professor
Department of Plant Biology, Box 7612
NC State University
Raleigh, NC 27606-7612
cell phone and voice mail: (919) 605-6116
office phone: (919) 515-2168
fax: (919) 515-3436
[email protected]
All electronic mail messages in connection with State business which are sent
to or received by this account are subject to the NC Public Records Law and may
be disclosed to third parties.