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.

For your particular case, there is actually a much simpler way to set 
all the edges in a particular clade to be a specific color and that is 
by first 'painting' a set of states onto the tree using 
phytools::paintSubTree. This creates an object with a new class 
("simmap") and when phylomorphospace sees that object it will 
automatically paint the edges of each subtree with different colors.

It is very old, but you can see an example of this on my blog here: 
http://blog.phytools.org/2013/05/paintsubtree-doesnt-actually-paint-tree.html.

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/8/2019 5:36 PM, AMANDA M SALVI wrote:
> Hi all,
> 
> I'm having issues adding color onto a phylomorphospace plot. I want one 
> subgenera to be color 1 and the other subgenera to be color 2, so I can 
> more easily visualize how the two subgenera covariate across the plot.
> 
> What I've attempted:
> 
> phylomorphospace(tree,df[,c("PEp","P50")], control=list(col.edge=1:36, 
> lwd=2))
> 
> But that gives me a plot without any edges (see attached png).
> 
> Thanks,
> 
> Amanda Salvi
> 
> 
> 
> 
> _______________________________________________
> R-sig-phylo mailing list - R-sig-phylo@r-project.org
> https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-sig-phylo&data=02%7C01%7Cliam.revell%40umb.edu%7C90755769f89d461f1a1d08d6a405d14c%7Cb97188711ee94425953c1ace1373eb38%7C0%7C1%7C636876742236592272&sdata=OfAbbR4h1yd6WBvSwy1YThANe3HAX9U6PwZ0q8r0KRc%3D&reserved=0
> Searchable archive at 
> https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.mail-archive.com%2Fr-sig-phylo%40r-project.org%2F&data=02%7C01%7Cliam.revell%40umb.edu%7C90755769f89d461f1a1d08d6a405d14c%7Cb97188711ee94425953c1ace1373eb38%7C0%7C1%7C636876742236592272&sdata=1IKTCiV8USm5OuhKM1Ecoak%2B8v0ceTkHdlfSkmnZen8%3D&reserved=0
> 

_______________________________________________
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