We need to put the legend back on the tree for the ancestral state plot for discrete traits.
In R I usually use
colors<-rainbow(nlevels(trait))
tiplabels(pch=21, bg=colors[as.numeric(trait)], cex=2.5, adj=1)
nodelabels(pie = ans$lik.anc, piecol = colors, cex = 0.5)
legend(locator(),c(levels(trait)), fill=colors, cex=1, xpd=TRUE, horiz = FALSE)
For aRbor, should this be
legend("topleft",c(levels(trait)), fill=colors, cex=1, xpd=TRUE, horiz = FALSE)
We need to put the legend back on the tree for the ancestral state plot for discrete traits. In R I usually use colors<-rainbow(nlevels(trait)) tiplabels(pch=21, bg=colors[as.numeric(trait)], cex=2.5, adj=1) nodelabels(pie = ans$lik.anc, piecol = colors, cex = 0.5) legend(locator(),c(levels(trait)), fill=colors, cex=1, xpd=TRUE, horiz = FALSE)
For aRbor, should this be legend("topleft",c(levels(trait)), fill=colors, cex=1, xpd=TRUE, horiz = FALSE)