怎么才能利用python生成下图的网络,也就是BA无标度网络,我自己试过生成的都不是样子
import networkx as nx
import matploylib.pyplot as plt
BA = nx.random_graphs.barabasi_albert_graph(30,1)
pos = nx.spring_layout(BA)
plt.suptitle('BA scale-free degree network')
nx.draw(BA,pos,with_labels = True,node_size = 180,font_size = 19)
plt.show()
我也是正在学,试试这个,我没试过,看见了,随便写下