
Luke made a few modifications/additions to my code to obtain this plot. First, he filled and shrunk the points that are the inferred states at internal nodes. He did this by changing the following line of code:
points(x=c(X[tree$edge[i,1],1],X[tree$edge[i,2],1]),
y=c(X[tree$edge[i,1],2],X[tree$edge[i,2],2]),
col=c(con$col.node[as.character(tree$edge[i,1]),1],
con$col.node[as.character(tree$edge[i,2]),1]))
to this:
points(x=c(X[tree$edge[i,1],1],X[tree$edge[i,2],1]),
y=c(X[tree$edge[i,1],2],X[tree$edge[i,2],2]),
col=c(con$col.node[as.character(tree$edge[i,1]),1],
con$col.node[as.character(tree$edge[i,2]),1]),pch=16,cex=0.8)
To plot the large, color coded tip nodes, he merely created the vector color.code.e, containing the species color coded by ecomorph; and then plotted his raw data for PCs 1 & 2 on top of his phylomorphospace graph as follows:
> points(X[,1],X[,2],col=(color.code.e),pch=16,cex=1.7)
Thanks to Luke for sharing this.
rumit pisan Cara Mencegah Sipilis
ReplyDelete