Hi,
I am trying to plot a 3D NMDS, which I can do it using the following codes;
nmds-read.table(file=my.file, header=T)
nmds.col-c(rep(green, 10), rep(blue, 8), rep(red, 8))
plot3d(nmds$axis1, nmds$axis2, nmds$axis3, col=nmds.col, xlab=1st Dimension,
ylab=2nd Dimension, zlab=3rd Dimension, type=s, size=2)
however, I intend to draw lines to group up dots of same categories, which I
able to do but only with 2D NMDS using the following codes;
nmds-read.table(file=my.file,header=T)
nmds.col-c(rep(green,10),rep(blue,8),rep(red,8))
nmds.group-c(rep(group1,9),rep(group2,8))
plot(nmds$axis1, nmds$axis2, col=nmds.col, xlab=1st Dimension, ylab=2nd
Dimension, type=p, pch=5, cex=1)
ordihull(nmds,groups=nmds.group,draw=lines,col=grey75,label=F)
legend(x=0.2, y=0.15, legend=c(group1, group2), pch=18, cex=1, col=c(red,
green, blue))
ordihull(nmds,groups=nmds.group,draw=lines,col=grey75,label=F)
Is there any codes I can use to have similar action like ordihull for 3D NMDS
plot?
P/S: My NMDS calculations were done using mothur software, which will produce
text files of NMDS axes and stress level.
Feng
From: mokshaof...@hotmail.com
To: r-sig-phylo@r-project.org
Date: Tue, 25 Mar 2014 00:38:46 +0800
Subject: [R-sig-phylo] Help with 3D NMDS Plot
Hi,
I am trying to plot a 3D NMDS, which I can do it using the following codes;
nmds-read.table(file=my.file, header=T)nmds.col-c(rep(green, 10),
rep(blue, 8), rep(red, 8))plot3d(nmds$axis1, nmds$axis2, nmds$axis3,
col=nmds.col, xlab=1st Dimension, ylab=2nd Dimension, zlab=3rd
Dimension, type=s, size=2)
however, I intend to draw lines to group up dots of same categories, which I
able to do but only with 2D NMDS using the following codes;
nmds-read.table(file=my.file,header=T)nmds.col-c(rep(green,10),rep(blue,8),rep(red,8))nmds.group-c(rep(group1,9),rep(group2,8))plot(nmds$axis1,
nmds$axis2, col=nmds.col, xlab=1st Dimension, ylab=2nd Dimension,
type=p, pch=5,
cex=1)ordihull(nmds,groups=nmds.group,draw=lines,col=grey75,label=F)legend(x=0.2,
y=0.15, legend=c(group1, group2), pch=18, cex=1, col=c(red, green,
blue))ordihull(nmds,groups=nmds.group,draw=lines,col=grey75,label=F)
Is there any codes I can use to have similar action like ordihull for 3D NMDS
plot?
P/S: My NMDS calculations were done using mothur software, which will produce
text files of NMDS axes and stress level.
Feng
[[alternative HTML version deleted]]
___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/
___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/