Note
This is the documentation for the current state of the development branch of rustworkx. The documentation or APIs here can change prior to being released.
rustworkx.digraph_spiral_layout#
- digraph_spiral_layout(graph, /, scale=1, center=None, resolution=0.35, equidistant=False)#
Generate a spiral layout of the graph
- Parameters:
graph (PyDiGraph) – The graph to generate the layout for
scale (float) – An optional scaling factor to scale positions
center (tuple) – An optional center position. This is a 2 tuple of two
float
values for the center positionresolution (float) – The compactness of the spiral layout returned. Lower values result in more compressed spiral layouts.
equidistant (bool) – If true, nodes will be plotted equidistant from each other.
- Returns:
The spiral layout of the graph.
- Return type: