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.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 horizontal 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 positionaspect_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: