import networkx as nximport matplotlib.pyplot as pltimport mathG=nx.Graph()# G=nx.DiGraph()#有向图# G=nx.MultiGraph()# G=nx.MultiDiGraph()G.add_ed...