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 position

  • resolution (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:

Pos2DMapping