代码如下:
import networkx as nx
import numpy as np
import matplotlib.pyplot as plt
G=nx.Graph()
row=np.array([1,1,2,2,2,3,3,3,4,4,4,5,5,5,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,12,12,13,13,13,14,14,14,15,15,15])
col=np.array([2,6,1,3,7,2,4,8,3,5,9,4,10,11,1,7,2,6,8,12,3,7,9,13,4,8,10,14,5,9,11,15,5,10,15,7,13,8,12,14,9,13,15,10,11,14])
value=np.array([0.330662859,-0.056557883,0.34856477,0.025276874,0.3050114,0.056812521,0.215976866,0.166110907,0.243977276,0.034719714,0.054861118,0.055808871,-0.039043542,0.058437946,-0.101259502,-0.331377311,0.25198946,-0.320123471,-0.02723931,0.119581776,0.176017797,-0.038956472,-0.387752157,0.247796397,0.06440725,-0.393122237,-0.090482266,0.243173972,0.027263426,-0.100215075,-0.341195674,0.056683016,0.026823451,-0.315617694,0.062374324,0.079891108,0.021463222,0.239695667,-0.002095218,0.167027081,0.208919576,0.159271326,0.061775297,0.055081582,0.077116704,0.05