Thanks so much for your reply, Liam. 

Most of the tip labels plotted by plot.phylo are in an optimal place, but while 
plotting a large number of trees, I have observed some “outliers" where the tip 
label is mispositioned and overlaps with the edge. Therefore, I would like to 
move some of those “bad” labels.

I am afraid my grasp of R’s underbelly is not profound enough to understand how 
to implement your last suggestion. It seems that you are extracting the tip 
label xy coordinates from the last tree that was plotted, but how do you then 
assign the new, modified coordinates to a new plot?

Thanks again for helping with this, it’s much appreciated.

Kamila

> On Jun 29, 2016, at 10:32 PM, Liam J. Revell <liam.rev...@umb.edu> wrote:
> 
> Dear Kamila.
> 
> In what way would you like to adjust the tip labels? The most useful 
> adjustment that I have found is the argument lab4ut="axial" which plots the 
> labels with the angle of the corresponding terminal edge. It is also possible 
> to offset the tip labels using label.offset>0.
> 
> We can also get the positions of the tips in the coordinates of our plotting 
> device as follows:
> 
> obj<-get("last_plot.phylo",envir=.PlotPhyloEnv)
> x<-obj$xx[1:obj$Ntip]
> y<-obj$yy[1:obj$Ntip]
> 
> You can then use these coordinates to plot your labels any way you choose!
> 
> - Liam
> 
> Liam J. Revell, Associate Professor of Biology
> University of Massachusetts Boston
> web: http://faculty.umb.edu/liam.revell/
> email: liam.rev...@umb.edu
> blog: http://blog.phytools.org
> 
> On 6/29/2016 5:11 PM, Kamila Naxerova wrote:
>> Dear all,
>> 
>> is there a way to adjust the position of tip labels when plotted an unrooted 
>> tree with plot.phylo?
>> 
>> Many thanks,
>> Kamila
>> 
>> 
>> 
>> The information in this e-mail is intended only for t...{{dropped:24}}

_______________________________________________
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/

Reply via email to