Skip to content

Plotting lineage tree - #320

Draft
yfukai wants to merge 2 commits into
royerlab:mainfrom
yfukai:plot_lineage_tree
Draft

Plotting lineage tree#320
yfukai wants to merge 2 commits into
royerlab:mainfrom
yfukai:plot_lineage_tree

Conversation

@yfukai

@yfukai yfukai commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Plotting lineage trees of tracksdata in matplotlib. I believe this is of interest to a fraction of users!

yfukai and others added 2 commits July 24, 2026 09:03
Add plot_lineage_tree in tracksdata.functional._plot: render lineage
trees with matplotlib, supporting attribute-bound node colors and sizes,
time windows, and exact timestamps. Export from tracksdata.functional and
add an optional `plot` extra (matplotlib).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…lineage_tree

Rename color_attr/size_attr to color/size and let color, size, marker, and
text each accept either a fixed value or a callable resolving a per-node
value from the node's attribute row:

- color: numeric attr or callable returning numbers -> cmap + colorbar;
  callable returning literal colors (names/hex/RGBA) -> used verbatim.
- size: attr mapped to size_range, callable returning raw sizes, or constant.
- marker: single glyph, or callable returning a per-node glyph (nodes are
  grouped by glyph, one scatter call per group, sharing one normalization).
- text: attr name or callable -> per-node annotation, styled via text_kwargs.

Add `attrs` to declare the node keys callables read. If a callable is given
without `attrs`, warn and load all node attributes (may pull mask blobs).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant