Hi Feng, This is a phylogenetics special interest list. You're probably not getting replies because your question appears to have nothing to do with phylogenetics. From the look of it, it might be better for Stack Overflow or something similar.
Cheers, Rob On 30 March 2014 18:35, Mok Shao Feng <[email protected]> wrote: > 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: [email protected] > > To: [email protected] > > 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 - [email protected] > > https://stat.ethz.ch/mailman/listinfo/r-sig-phylo > > Searchable archive at > http://www.mail-archive.com/[email protected]/ > _______________________________________________ > R-sig-phylo mailing list - [email protected] > https://stat.ethz.ch/mailman/listinfo/r-sig-phylo > Searchable archive at > http://www.mail-archive.com/[email protected]/ > -- Rob Lanfear Research Fellow, Ecology, Evolution, and Genetics, Research School of Biology, Australian National University phone: +61 (0)2 6125 3611 www.robertlanfear.com [[alternative HTML version deleted]] _______________________________________________ R-sig-phylo mailing list - [email protected] https://stat.ethz.ch/mailman/listinfo/r-sig-phylo Searchable archive at http://www.mail-archive.com/[email protected]/
