rustworkx.graph_bipartite_layout#

graph_bipartite_layout(graph, first_nodes, /, horizontal=False, scale=1, center=None, aspect_ratio=1.33333333333333)#

Generate a bipartite layout of the graph

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

  • first_nodes (set) – The set of node indices on the left (or top if horitontal is true)

  • horizontal (bool) – An optional bool specifying the orientation of the layout

  • 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

  • aspect_ratio (float) – An optional number for the ratio of the width to the height of the layout.

Returns:

The bipartite layout of the graph.

Return type:

Pos2DMapping