我试图在使用Graphviz进行渲染的Python模块diagrams中创建一个包含两个 node (在这里可视化为用户)的水平集群.
但实现这一点的唯一方法是在 node 之间添加边.
水平,但在 node 之间显示边缘
from diagrams import Cluster, Diagram
from diagrams.onprem.client import User
with Diagram("sample", show=False) as diag:
with Cluster("sample horizontal cluster with edge"):
node1 = User("Some Node")
node2 = User("Some other Node")
node1 >> node2
这将产生:
没有边,但垂直
我试着在没有连接的情况下node1 >> node2
:
with Cluster("sample horizontal cluster with edge", direction="LR"):
node1 = User("Some Node")
node2 = User("Some other Node")
Then it renders vertically, which I don't want:
我不想看到那条边,但要让 node 水平排列.
我怎样才能做到这一点呢?