library(phytools)
data(ligophorus_shape)
data(ligotree)
data(spcolmap)
shapev <- pca2d(ligophorus_shape[,1:22], sgn=1, labcol=spcolmap$color,
phylo=TRUE, phy=ligotree, genus="L. ",
bound.y = c(-0.1, 0.1), bound.x1 =c(-0.15,0.2), bound.x2=c(-0.15,0.2))
fff <- c(0,1,1,2,2,3,3,0,4,4)
nf <- layout(matrix(c(rep(0,length(fff)),rep(fff,5),rep(0,length(fff))),
7,length(fff),byrow=TRUE))
layout.show(nf)
par(mar=c(5,4,4,1))
#the loadings for the first three PC of shape variables of the ventral anchors
pcloadhm(shapev$variable,sgn=1,pc=1,yaxis=TRUE,tit="VPC1")
pcloadhm(shapev$variable,sgn=1,pc=2,ylab="", tit="VPC2")
pcloadhm(shapev$variable,sgn=1,pc=3,ylab="", tit="VPC3")
#add a colorbar for completeness
par(mar=c(5,2,4,3))
colorBar(min=-1, max=1)
Run the code above in your browser using DataLab