I'm attempting to produce an ancestral reconstruction using the ape and phytools package in Rstudio. My problem is that in my phylogenetic tree the tip labels / species names are overcrowded and illegible. Currently, my tree has a dataset of 262 species.
An example nexus file of the data can be found here.
The Ancestral reconstruction tree I have produced so far is here: http://i.imgur.com/WFoEu7S.png.
Each species has a character state of 0 or 1 and has node and tip labels addressing each state. Eventually i'd like to color the branches with their respective character state(which I have as either red or black.)
Ideally, I wish to produce a non-ultrametric tree similar to a previous question on stack overflow in this link here.
I've tried implementing the R code from this link for my own tree with little success.
Below is my code in R. I am still learning R and am unfamiliar with certain plotting methods and suspect that may be the issue here:
tree = read.nexus("test_nexus")
dichot_tree = multi2di(tree)
dichot_tree$edge.length<-runif(n=nrow(dichot_tree$edge),min=0,max=1)
dichot_tree$edge.length[dichot_tree$edge.length<1]<-1
domest = read.nexus.data("test_nexus")
aceDISCRETE<-ace(as.numeric(domest), dichot_tree, type="discrete")
plot(dichot_tree, cex=0.5, label.offset=1, no.margin=TRUE)
tiplabels(pch=22, bg=as.numeric(domest),cex=1, adj=1)
nodelabels(pie=aceDISCRETE$lik.anc, piecol=c("black", "red"), cex=0.25)