aryagraph.layout.radial#
- aryagraph.layout.radial(g: Any, *, root: Hashable | Iterable[Hashable] | None = None, rank_sep: float = 80.0, sizes: Any = None, seed: int = 0, node_sep: float = 16.0, uniform: bool = True) Layout[source]#
Radial tidy tree: the root in the centre, depth levels on concentric rings.
Every node owns an angular wedge proportional to its number of leaves and sits in the middle of it, so subtrees never interleave. Ring radii grow with rank_sep (gap between the boxes of consecutive rings) and are enlarged where needed so neighbours on a ring keep node_sep between their boxes. With uniform (default) the rings are then evenly spaced (
r_d = d · max_k(r_k / k)), which keeps every ring’s minimum while avoiding long spokes to a crowded outer ring. Roots are chosen as intree(); forests are packed.Returns a metric layout;
metahasroots,depth,parentandradii(ring radius per depth, per tree).