draw_partitions¶
- draw_partitions(graph, reverse_index_maps, pos=None, figsize=(10, 8), node_size=300)[source]¶
Draw a graph with nodes colored by partition.
- Parameters:
graph (
Graph) – The full graph.reverse_index_maps (
dict) – Mapping{prog_id: {local_idx: global_node}}, as built by_GraphProblemBase.decompose().pos (
dict|None) – Node positions. If None, uses spring layout.figsize (
tuple[int,int] |None) – Figure size(width, height).node_size (
int) – Size of nodes.