Closed tlnagy closed 10 years ago
Hi Tamas,
region labels are not implemented yet, although the feature is in the roadmap for future versions.
Adding a legend is possible using the TreeStyle.legend, which is a FaceContainer object. You can use TreeStyle.add_face(...) and then place the full block in any of the four corners of the image (TreeStyle.legend_position).
Something like this: http://pythonhosted.org/ete2/tutorial/tutorial_drawing.html?highlight=legend#add-legend-and-title
cheers, jaime
PS. I am CCing this question to the support mailing list
Jaime Huerta-Cepas, Ph.D. Structural and Computational Biology Unit EMBL Heidelberg Meyerhofstraße 1, 69117 Heidelberg, Germany
2014-06-25 16:58 GMT+02:00 Tamas Nagy notifications@github.com:
I have a graphic that is very dense and it's hard to distinguish between the leaves so I wanted to label over each colored region to indicate what they are:
[image: test2] https://cloud.githubusercontent.com/assets/1661487/3386925/c21eaf24-fc78-11e3-9ec4-9b36fc9228ff.png
How could I do this? I would prefer to label over the individual regions themselves, but a legend would work as well. I'm coloring the regions using NodeStyle's background color property.
Thanks for the help! -t
— Reply to this email directly or view it on GitHub https://github.com/jhcepas/ete/issues/83.
Using a simple legend will work for now. Thanks!
I have a graphic that is very dense and it's hard to distinguish between the leaves so I wanted to label over each colored region to indicate what they are:
How could I do this? I would prefer to label over the individual regions themselves, but a legend would work as well. I'm coloring the regions using
NodeStyle
's background color property.Thanks for the help! -t