简体   繁体   English

Networkx 有向图 Python

[英]Networkx Directed Graph Python

I want to draw a directed graph with Python library Networkx, the problem is that when I have a connection from Node1 to Node1, and back from Node2 to Node2, their labels are overwritten.我想用 Python 库 Networkx 绘制一个有向图,问题是当我从 Node1 连接到 Node1,然后从 Node2 连接到 Node2 时,它们的标签被覆盖。

Is there a method to draw curves from one node to another, or a way to configure labels position?有没有一种方法可以将曲线从一个节点绘制到另一个节点,或者一种配置标签位置的方法?

In screenshot you can see that I have two directed lines but only one label, second label is over first.在屏幕截图中,您可以看到我有两条有向线,但只有一个标签,第二个标签首先结束。

已通过 label_pos=0.2 解决

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM