I got it! And it looks lovely. Thanks so much Liam and Cecile.

Best,

Amanda
________________________________
From: R-sig-phylo <r-sig-phylo-boun...@r-project.org> on behalf of Liam Revell 
<liam.rev...@umb.edu>
Sent: Saturday, March 9, 2019 9:42 AM
To: Cecile Ane; r-sig-phylo@r-project.org
Subject: Re: [R-sig-phylo] using color function in phylomorphospace

Cecile makes a good point. In this case if your tree has 36 edges all
you would have to do is change your code such that:

phylomorphospace(...,control=list(col.edge=setNames(1:36,tree$edge[,2])))

and you'll have the colors that correspond to the numeric vector 1:36.
(These are just the 8 colors of palette() repeated until you get to 36.)

For the purposes of painting different clades with different colors I
still recommend paintSubTree.

All the best, Liam

Liam J. Revell
Associate Professor, University of Massachusetts Boston
Profesor Asistente, Universidad Cat�lica de la Ssma Concepci�n
web: http://faculty.umb.edu/liam.revell/, http://www.phytools.org

Academic Director UMass Boston Chile Abroad (starting 2019):
https://www.umb.edu/academics/caps/international/biology_chile

On 3/9/2019 12:27 PM, Cecile Ane wrote:
> colors can be numeric. for example:
> plot(1:36, 1:36, col=1:36)
> C�cile
>
>> On Mar 8, 2019, at 8:42 PM, Liam Revell <liam.rev...@umb.edu
>> <mailto:liam.rev...@umb.edu>> wrote:
>>
>> Dear Amanda.
>>
>> I'm a little confused by your code. If you want to use
>> control=list(col.edge) you need to set col.edge to a vector of colors,
>> but in your example col.edge is a numeric vector from 1 to 36.
>
_______________________________________________
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/

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

Reply via email to