defplot_graph(graph):fromnetworkx.drawing.nx_agraphimportgraphviz_layoutpos =graphviz_layout(graph, prog='dot')forhinnx.connected_component_subgraphs(graph.to_undirected()): nx.draw(h, pos, with_labels=True) plt.show() 开发者ID:fepz,项目名称:curso-pg-ferro-strd-2016,代码行数:8,代码来源:...