Skip to content

[Drawing] Add a TreeSequence.draw() method? #579

@jeromekelleher

Description

@jeromekelleher

We're getting some very powerful tools with the new draw_svg() functions, but we're missing a simple way to annotate a tree sequence (like say, node colours) without having to be an SVG/CSS guru.

What if we add a .draw() method to TreeSequence that mirrors the API of Tree.draw()?

I would say we keep most options, except format. Then, the advice is

  • Use draw_text if you want to draw text.
  • Use draw if you want SVG output to have quick styling, with some simple options.
  • Use draw_svg if you want SVG output with full control

We could then deprecate format="unicode" in Tree.draw()?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Python APIIssue is about the Python APIVisualisationThis issue addresses visualisationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions