Extract a Validated Basin Merge-Tree Layout
Source:R/basin_merge_tree_public.R
get.basin.merge.tree.layout.RdReturns the canonical branches, merge events, crossing-free leaf order, and
plotting coordinates for one direction and graph component without
drawing. A restricted set of canonical basin ids must contain its component
root and every ancestor unless close.ancestors = TRUE, in which case the
missing ancestors are added and reported. Scalar-field birth, death, merge,
and persistence values are preserved exactly from the canonical merge tree.
Usage
get.basin.merge.tree.layout(
x,
direction = "max",
component = NULL,
basin.ids = NULL,
close.ancestors = FALSE,
label = c("basin.id", "extremum.id", "extremum.vertex"),
labels = NULL
)Arguments
- x
A
basin.merge.tree, or a compatiblebasin_complex.- direction
Tree orientation,
"max"or"min".- component
Graph-component number. It may be omitted when the selected direction has one component, or when
basin.idsidentify exactly one component.- basin.ids
Optional nonempty character vector of canonical basin ids.
NULLselects the complete component.- close.ancestors
Add missing canonical ancestors of
basin.ids.- label
Canonical basin-table field used for branch labels.
- labels
Optional custom labels. A named vector is matched by basin id; an unnamed vector follows deterministic selected-branch order.