设置颜色的代码:
- nodecol<-rep("grey", ecoldata[[1]]$Nnode)
- habitcol<-rep("black", length(ecoldata[[2]][,1]))
- habitcol[ecoldata[[2]][,1] == "stream"] <- "red"
- habitcol[ecoldata[[2]][,1] == "river"] <- "blue"
- phycol<-c(habitcol, nodecol)
- names(phycol)<-1:(length(ecoldata[[1]]$tip)+ecoldata[[1]]$Nnode)
- space <- phylomorphospace(ecoldata[[1]], cbind(phypcamorph$S[,1], phypcamorph$S[,2]),
- xlab="PC1", ylab="PC2", pch=16, control=list(col.node=phycol))