0

enter image description here This is my tree

Hi, I was wondering if anyone knows a better way to color the tips or edges for each clade of the tree that's attached.

((MusMusculus:0.00,((BosTaurus:0.00,OryctolagusCuniculus:0.00):22.50,(LamaGlama:0.00(HomoSapiens:0.00,PansPansicus:0.00):23.00):41.50):75.33):103.00);

Right now, i am doing it in a not generalized way of extracting the tip labels in order then color them using this syntax:

tiplabels(tip_labels, bg = c('purple','blue','blue','green','red','red'), cex=0.5, fg="transparent")

I want to find a more generalized way where if I put in a different tree, the clade will be labeled with different color.

Xiaoxixi
  • 91
  • 8
  • Please share a portion of your data, the code used to generate the tree, and clarify what your desired outcome is. See [this link](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) for more info on how to ask a good question on this site – astrofunkswag Jun 22 '20 at 18:37
  • @astrofunkswag, Hi, thank you for the suggestion. My data is shared in the question. it is the string of names including edge lengths. One can read this string in R and produce the exact same tree I provided as a picture in my question. My desired outcome is not JUST specific for these data but how to color clade in a more general way than the code I provided. – Xiaoxixi Jun 22 '20 at 18:38

0 Answers0