The way I've handled this is probably inefficient, but I get the labels to match up by writing the tree as I have plotted it, then reading that back in: then, the tip labels are in order with the plotted tips, bottom to top:
a = rtree(20) plot(a) a$tip.label ## labels match, bottom to top plot(ladderize(a)) a$tip.label ## labels do not match a <- read.tree(write.tree(ladderize(a))) a <- read.tree(text = write.tree(ladderize(a))) a$tip.label ## labels match once more, bottom to top Though this may not be robust to future changes in ape, as I'm not doing anything to check the tip order. I hope this helps. Take care, Andrew On 5/6/2014 11:25 AM, Ferguson-Gow, Henry wrote: > It seems like the plot() function is not plotting the tips in the edge order, > and so when the tip labels are written in 1:n order, they do not match up. > How can I reorder the tip labels to match the order in which the tips are > plotted by plot()? I am happy with the tip order on the plotted tree, so I > would rather work out how to reorder the tip labels in the text() command, > rather than reorder the tips on the tree. -- Andrew Hipp, PhD Senior Scientist in Plant Systematics and Herbarium Curator, The Morton Arboretum Lecturer, Committee on Evolutionary Biology, University of Chicago /*Address from 6 Jan through 10 Jul 2014:* UMR 1202 BIOGECO - INRA / Université Bordeaux 1 69 route d'Arcachon / 33612 CESTAS Cedex / FRANCE +33 5 57 12 28 31 *Permanent address* 4100 Illinois Route 53 / Lisle IL 60532-1293 / USA +1 630 725 2094 / http://systematics.mortonarb.org/lab http://quercus.mortonarb.org http://evbio.uchicago.edu/ [[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/