NetworkX is a Python library for studying graphs and networks. NetworkX is free software released under the BSD-new license. It can be used to create and manipulate complex networks, and to study the structure and function of complex networks.

With NetworkX, you can load or store networks in standard or non-standard data formats. It can generate many types of random or classic networks, analyze network structure, build network models, design new network algorithms, and draw networks.

Of course, NetworkX alone cannot be powerful. Here, Chunjian Muke will use other widely used common Python libraries to draw various basic network graphs.


1. Drawing the Most Basic Network Graph

A network graph consists of nodes and edges. In NetworkX, each row of a pandas DataFrame represents the points in a connection, and a connection is generated at the corresponding position. In the example, a connection is generated between each corresponding position of ‘from’ and ’to’.

……

阅读全文