
Lay out an existing Bonsai tree
rs_bonsai_layout.Rd
Computes a new 2D layout for a finished tree without searching again. The
tree is renumbered internally, so inferred ancestors can come back with
different indices than they went in with; leaves keep theirs. Replace the
whole node table with the output.
Arguments
- parent
Integer. Parent of each node (0-indexed!), negative for the root.
- branch
Numeric. Branch length above each node.
- n_leaves
Integer. Number of leaves, which occupy the first
n_leavesnodes.- layout
String. One of
c("equal_angle", "equal_daylight", "dendrogram").- hyperbolic
Boolean. Project onto the hyperbolic disk.