You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you're aware of any tip to build it, please let me knwo!
I built and maintain a python library for network visualisation called netgraph.
Netgraph accepts igraph and networkxGraph objects as input (as well as many other sensible data structures to represent graphs in python).
For edge bundling, netgraph implements the FDEB algorithm proposed by Holten & Wijk (2009).
Example visualization that combines a modular node layout with edge bundling:
importmatplotlib.pyplotaspltimportnetworkxasnxfromnetgraphimportGraph# pip install netgraph# create a modular graphpartition_sizes= [10, 20, 30, 40]
g=nx.random_partition_graph(partition_sizes, 0.5, 0.1)
# position nodes according to their community using the `community` node layoutnode_to_community=dict()
node=0forcommunity_id, sizeinenumerate(partition_sizes):
for_inrange(size):
node_to_community[node] =community_idnode+=1# color nodes according to their communitycommunity_to_color= {
0 : 'tab:blue',
1 : 'tab:orange',
2 : 'tab:green',
3 : 'tab:red',
}
node_color= {node: community_to_color[community_id] fornode, community_idinnode_to_community.items()}
Graph(g,
node_color=node_color, node_edge_width=0, edge_alpha=0.1,
node_layout='community', node_layout_kwargs=dict(node_to_community=node_to_community),
edge_layout='bundled', edge_layout_kwargs=dict(k=2000),
)
plt.show()
The text was updated successfully, but these errors were encountered:
I built and maintain a python library for network visualisation called netgraph.
Netgraph accepts
igraph
andnetworkx
Graph
objects as input (as well as many other sensible data structures to represent graphs in python).For edge bundling, netgraph implements the FDEB algorithm proposed by Holten & Wijk (2009).
Example visualization that combines a modular node layout with edge bundling:
The text was updated successfully, but these errors were encountered: