rustworkx.circular_layout#

circular_layout(graph, scale=1, center=None)[source]#

Generate a circular layout of the graph

Parameters:
  • graph – The graph to generate the layout for. Can either be a PyGraph or PyDiGraph

  • 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

Returns:

The circular layout of the graph.

Return type:

Pos2DMapping