Hi Liam, I was using the function simmap for stochastic mapping, but when I run these following code, the character history is mapped along the phylogeny branches, but the tip labels disappears:
# function to compute the states foo<-function(char1){ y<-sapply(char1$maps,function(char1) names(char1)[1]) names(y)<-char1$edge[,1] y<-y[as.character(length(char1$tip)+1:char1$Nnode)] return(y) } XX<-sapply(mtrees,foo) pies<-t(apply(XX,1,function(char1,levels,Nsim) summary(factor(char1,levels))/Nsim,levels=c("0","1","2"),Nsim=100)) # done computing the states *# code to plot the tree* *mtrees<-rescaleSimmap(mtrees,1)* *cols<-c("black","red", "yellow"); names(cols)<-c(0,1,2)* *par(mar=rep(0.1,4))* *plot.phylo(mtrees[[1]],plot=FALSE,no.margin=T)* *plotSimmap(mtrees[[1]],cols,pts=FALSE,lwd=3,ftype="off", add=TRUE)* *text(1,1:length(mtrees[[1]]$tip),mtrees[[1]]$tip.label, pos=4,font=3)* *nodelabels(pie=pies,cex=0.6,piecol=cols)* Is there a code for maintaining the tip labels in the phylogeny with characters mapped? Mnay thanks in advance Felipe Rossetto Herbário FUEL Departamento de Biologia Animal e Vegetal Universidade Estadual de Londrina Rodovia Celso Garcia Cid, PR 445 Km 380, Campus Universitário Caixa postal 10.011 CEP: 86057-970 Londrina, Paraná, Brasil CV: http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4211230P7 [[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/