Skip to content

Circular tree behavior has regressed in ete4 #805

Description

@xosxos

FYI: drawing circular trees has regressed so that in ETE4 I get this weird staircase of colors

Before
Image

After
Image

ts = TreeStyle()

ts.branch_vertical_margin = 10
ts.show_leaf_name = False
ts.show_scale = False

ts.mode = "c"
ts.arc_start = 0
ts.arc_span = 355
ts.min_leaf_separation = 0
ts.root_opening_factor = 0
ts.optimal_scale_level = "mid"
ts.allow_face_overlap = True

for n in t.traverse():
  if not n.is_leaf:
      F = TextFace(label, tight_text=True, penwidth=30, fsize=8)
      F.rotation = 270
      n.add_face(F,  column=0)

  if n.is_leaf:
      style = NodeStyle()
      style["fgcolor"] = color
      style["size"] = 0
      style["hz_line_type"] = 0
      style["vt_line_type"] = 0
      style["shape"] = "square"

      n.set_style(style)
      n.img_style["bgcolor"] = colors[color_i]
    

It seems like the colors on top right are filling backwards. I can provide more details and tests if needed

Cheers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions