How to draw a large-scale network graph using networkx(Occlusion issue)

Viewed 51

There is a social network graph with more than 6000 vertices and tens of thousands of edges. It is drawn directly by Python networkx as shown in the figure. How to make her look better and clearer, and make interactive information more obvious?

The disorganized graph

And what I have done is try to decrease all those transparencies or make the line thinner. But it looks like the result is still disorganized. Because my screen is fixed, no matter what I do, the lines are very dense just like the pic before.

My little thinking is I don't try to make all lines clear but to make some lines clear. It may be like, increasing the opacity of some lines which are more important or more prominent structures, decreasing the opacity of other lines, like to calculate the edge_betweenness value for every edge and using this to set the transparency of each line. The code is below:

G = nx.read_gml('data\\lesmis.gml')

cent = edge_betweenness_centrality(G)
#node_pos = nx.spring_layout(G)
node_pos = nx.kamada_kawai_layout(G)
#node_pos = nx.circular_layout(G)
nx.draw_networkx_nodes(G,node_pos,**options)#draw nodes
[nx.draw_networkx_edges(G,node_pos,edgelist=[key],alpha=np.amin([1,value*100]),width=2) for key,value in cent.items()] #loop through edges and draw them

plt.show()

But the result is just so so. Is there anyone who can give me some methods, or just a little advice or possible ideas?

0 Answers
Related