Runs one of G6's tree layouts on any graph. G6's tree layouts take a node's children from its successors and lay out every root from the same origin. On a graph that is not a forest, a node with several parents lands under one of them and leaves an empty slot under the others, and separate roots are drawn on top of each other. This layout first keeps one parent per node and hangs the roots side by side under a hidden root. The other edges are still drawn; they just don't place anything. On a forest it gives the base layout's arrangement, spaced by the drawn nodes' sizes rather than the base layout's defaults. Cycles are broken where found, so any graph lays out.
Usage
spanning_tree_layout(
base = c("indented", "compact-box", "dendrogram", "mindmap"),
...
)Arguments
- base
The tree layout to run: "indented", "compact-box", "dendrogram" or "mindmap".
- ...
Options of the base layout, e.g.
direction,indent,getHGap,getVGap(seeindented_layout(),compact_box_layout(),dendrogram_layout()andmindmap_layout()). Node sizes default to the drawn nodes' sizes.