Hi John, 

The problem was with taxo.fonts. This is fixed in version 1.4.44

Christoph


On Oct 29, 2010, at 7:50 AM, John Cumbers wrote:

> Sorry,my previous example for taxo.fonts was incomplete. Here is
> another example of the problem that I am having trying to align tips
> with taxo.fonts:
> The error ir produces is: Error in text.default(xx[-id], yy[-id],
> tax[-id], font = 3, adj = c(0,  :
>  zero length 'labels'
> 
> Here is the code that produces the error:
> 
> library(ape)
> library(phyloch)
> 
> read.tree(text="((JC0034:0.56193117703558859155,((JC0032:0.26417452948039871208,(JC0039:0.00000198431968445117,(JC0040:0.04090238861482920624,(JC0036:0.00000198431968445117,(JC0035:0.00278594072123998721,JC0043:0.00000198431968445117)98:0.00839151437796370123)81:0.00271501071388845780)37:0.00284385118684500095)99:0.27548176713181982134)99:0.19955357589693831222,(JC0042:0.16727054495452559069,((JC0044:0.20745840487731395663,(JC0045:0.03317407925666514962,JC0041:0.05169361744053992125)100:0.17820118129244821858)96:0.02713741920299188315,((JC0038:0.00000198431968445117,JC0046t:0.00000198431968445117)99:0.00837767044457797365,JC0037:0.00000198431968445117)100:0.14356932073243436343)100:0.17940764911877768450)100:0.44467488567142149369)75:0.04619993402434956209):0.52905368142148145871,7421_desC:0.52905368142148145871);")->ttt
> 
> plot(ttt)
> 
> plot.phylo(ttt, tip.color = 0, x.lim = c(0, 1.3))
> taxo.fonts(ttt, align = TRUE, offset = 0.1)
> 
> 
> On Thu, Oct 28, 2010 at 1:16 PM, John Cumbers <johncumb...@gmail.com> wrote:
>> Hi Christoph et al.
>> 
>> Thanks for the help, I've been trying to use ?taxo.fonts in the pyloch
>> package on my tree but I keep getting this error:
>> 
>> Error in text.default(xx[-id], yy[-id], tax[-id], font = 3, adj = c(0,  :
>>  zero length 'labels'
>> 
>> I can't understand why.  I do have some zero length labels "", but
>> even when I add some arbitrary values to them I still get the error,
>> and even the vipera example has some "" (which I take to be zero
>> length) labels and that plots fine.   I can repeat the problem with
>> the woodmouse dataset from Ape:
>> 
>> data(woodmouse)
>> plot.phylo(woodmouse.nj, tip.color = 0, )
>> taxo.fonts(woodmouse.nj, align = TRUE, offset = 0.1)
>> #produces the above error
>> 
>> But this works fine:
>> data(vipera)
>> plot.phylo(vipera, tip.color = 0, x.lim = c(0, 1.3))
>> taxo.fonts(vipera, align = TRUE, offset = 0.1)
>> 
>> Any help appreciated.
>> 
>> John
>> 
>> 
>> 
>> On Wed, Oct 27, 2010 at 3:12 AM, Christoph Heibl
>> <christoph.he...@gmx.net> wrote:
>>> Hi,
>>> 
>>> 
>>> On Oct 27, 2010, at 1:03 AM, Andy Rominger wrote:
>>> 
>>>> Hi John,
>>>> 
>>>> This is the default plotting style in package ade4 (using an object of 
>>>> class
>>>> phylog to store your tree, and plot.phylog(...) for plotting).
>>>> 
>>>> You can convert between an object of class `phylo' from ape to `phylog' in
>>>> ade4 with a two-step method:
>>>> # phylo to newick:
>>>> my.newick <- write.tree(my.phylo)
>>>> # newick to phylog
>>>> my.phylog <- newick2phylog(my.newick)
>>>> # you could do it in one line if you like that kind of thing...
>>>> 
>>>> Your other option if you want to keep it all in package ape is to use
>>>> dist.nodes(...) to get the distance of each tip from the root and then use
>>>> this distance to add a line segment at the end of each tip.  You can use
>>>> this command to get information about where all the various edges have been
>>>> drawn:
>>>> get("last_plot.phylo", envir = .PlotPhyloEnv)
>>> 
>>> If you want use ape, Andy´s second approach is implemented in taxo.fonts in 
>>> the phyloch package[1].
>>> See the last example in ?taxo.fonts
>>> 
>>> Best,
>>> Christoph
>>> 
>>> [1] http://www.christophheibl.de/Rpackages.html
>>> 
>>>> 
>>>> Hope that helps, good luck!
>>>> Andy
>>>> 
>>>> 
>>>> On Tue, Oct 26, 2010 at 3:57 AM, John Cumbers <johncumb...@gmail.com> 
>>>> wrote:
>>>> 
>>>>> Hi all,
>>>>> 
>>>>> I'm trying to align or justify the tip labels of a tree on the right
>>>>> with the plot function in Ape.    I want to keep the branch lengths,
>>>>> but have dotted lines reaching out to the tip labels.   If this can't
>>>>> be done in Ape or R, what other tools would you suggest for preparing
>>>>> trees for publication.
>>>>> 
>>>>> Thanks,
>>>>> John
>>>>> 
>>>>> _______________________________________________
>>>>> R-sig-phylo mailing list
>>>>> R-sig-phylo@r-project.org
>>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
>>>>> 
>>>> 
>>>>       [[alternative HTML version deleted]]
>>>> 
>>>> _______________________________________________
>>>> R-sig-phylo mailing list
>>>> R-sig-phylo@r-project.org
>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
>>> 
>>> 
>> 

_______________________________________________
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo

Reply via email to