etetoolkit / ete

Python package for building, comparing, annotating, manipulating and visualising trees. It provides a comprehensive API and a collection of command line tools, including utilities to work with the NCBI taxonomy tree.
http://etetoolkit.org
GNU General Public License v3.0
773 stars 216 forks source link

inconsistent performance of RectFace and CircleFace in aligned position in ete4 #654

Closed dengzq1234 closed 1 year ago

dengzq1234 commented 1 year ago

RectFace and Circle Face layout have strange performance in aligned position

RectFace: rectangular face became a endless bar label_rect = RectFace(width=50,height=50, color=colour_dict[prop_text], padding_x=1, padding_y=1) node.add_face(label_rect, column = 3, position = 'aligned') image

CircleFace: circleface from two different columns have big gap and not easy to see prop_face = CircleFace(radius=100, color=color) node.add_face(prop_face, column=level, position = "aligned") image

under the branch_right position, they performed normal

dengzq1234 commented 1 year ago

issues can be solved by adding self.aligned_faces = True or layout_fn.aligned_faces = True under tree layout class