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_random_layout#

digraph_random_layout()#

Generate a random layout

Parameters:
  • graph (PyDiGraph) – The graph to generate the layout for

  • center (tuple) – An optional center position. This is a 2 tuple of two float values for the center position

  • seed (int) – An optional seed to set for the random number generator.

Returns:

The random layout of the graph.

Return type:

Pos2DMapping