Skip to content

Adding extra elements on tree plots #14

@andersonbrito

Description

@andersonbrito

Hey, thank you for setting baltic up as a python package: the installation was much easier now. I installed it days ago, and since them I've been playing with its functionalities. I have a question about plotting extra elements on trees. I'm trying to achieve a result similar to this baltic figure.

The extra elements I want to plot are:

  1. Node markers indicating posterior probabilities
  2. tMRCA violin plots at internal nodes
  3. Date ticks in months
  4. A subtree, pruned from the imput tree

Concerning 1, I was wondering how I can achieve that using a function similar to plotPoints, but for nodes, not leaves.

Concerning 4, I tried to apply the function subtree, however, instead of getting a tree rooted at the selected commonAncestor tMRCA (2012.58), baltic is keeping the root of the original tree (1970.55). As a result, when using the cmap 'hsv', instead of having a gradient from blue to red, in the final plot I only see red/magenta hues (indicating the misplacement of the root decades before the expected).

Since I couldn't find specific instructions on austhecia or curonia, I was wondering if you have any examples on how to plot these elements.

Thank you.

Cheers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions