Layouts#

Layout engines return a Layout; compute dispatches by name.

Dispatcher#

compute

Compute a layout by name (the entry point used by aryagraph.draw()).

auto_method

The method compute() picks for method="auto".

Layout result#

Layout

Node positions, optional edge routes, and provenance.

pack_components

Arrange several component layouts side by side without overlap.

Hierarchical and trees#

hierarchical

Layered (Sugiyama) layout: the right picture for DAGs, pipelines and flows.

tree

Tidy layered tree drawing (Walker's algorithm, linear time).

radial

Radial tidy tree: the root in the centre, depth levels on concentric rings.

Force-directed and spectral#

stress

Stress-majorization layout (the modern replacement for Kamada–Kawai).

fruchterman_reingold

Fruchterman–Reingold spring embedder with simulated-annealing cooling.

force_atlas2

ForceAtlas2 (Jacomy, Venturini, Heymann & Bastian, 2014).

spectral

Layout from the Fiedler vector and the next Laplacian eigenvector.

Geometric#

circular

Nodes evenly spaced on a circle, clockwise on screen from start_angle.

shell

Concentric circles.

grid

Nodes on a square lattice in graph order, row by row (unit spacing).

random

Uniform random positions in the unit square (reproducible for a given seed).

spiral

Nodes along an Archimedean spiral, in graph order from the centre outwards.

bipartite

Two parallel lines of nodes, edges running between them.

arc

All nodes on one horizontal line, one unit apart: the basis of an arc diagram.

Post-processing#

remove_overlaps

Move nodes as little as possible so that no two node boxes overlap.