且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Networkx中的网格上绘制节点图

更新时间:2023-11-21 15:17:16

查看 networkx 随机几何图生成器,以实现您正在寻找的图 https://github.com/networkx/networkx/blob/master/networkx/generators/geometric.py#L79有一个示例显示了输出以及如何在此处绘制它 https://networkx.github.io/documentation/stable/tutorial.html#drawing-graphs

Take a look at the networkx random geometric graph generator for an implementation of a graph like you are looking for https://github.com/networkx/networkx/blob/master/networkx/generators/geometric.py#L79 There is an example that shows the output and how to draw it here https://networkx.github.io/documentation/stable/tutorial.html#drawing-graphs