Plotting lineage tree - #320
Draft
yfukai wants to merge 2 commits into
Draft
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plotting lineage trees of tracksdata in matplotlib. I believe this is of interest to a fraction of users!