我有以下代码:
digraph g {
graph [rankdir="LR" ,compound="true" ];
subgraph cluster0 {
graph [label="Ready\n\nAllowed Purchaser Operations:\noperation1,operation2\n\nAllowed Supplier Operations:\noperation1,operation3" ];
1 [ shape="none" ,fontcolor="white" ];
};
subgraph cluster2 {
graph [label="Paused\n\nAllowed Purchaser Operations:\noperation1,operation3\n\nAllowed Supplier Operations:\noperation2,operation3" ];
3 [ shape="none" ,fontcolor="white" ];
};
subgraph cluster4 {
graph [label="Completed\n\nAllowed Purchaser Operations:\noperation4\n\nAllowed Supplier Operations:\noperation4" ];
5 [ shape="none" ,fontcolor="white" ];
};
1 -> 3 [ ltail="cluster0" ,lhead="cluster2" ,comment="6" ];
1 -> 5 [ ltail="cluster0" ,lhead="cluster4" ,comment="7" ];
3 -> 1 [ ltail="cluster2" ,lhead="cluster0" ,comment="8" ];
3 -> 5 [ ltail="cluster2" ,lhead="cluster4" ,comment="9" ];
}
Run Code Online (Sandbox Code Playgroud)

我想增加子图之间的距离.我已经尝试使用len,margin,pad,但我一直在尝试,语法不起作用.有人能帮助我吗?
Pot*_*rca 13
我认为你正在寻找的东西(正如Emden指出的那样)确实是nodesep和ranksep属性.
graph [nodesep=6, ranksep=4];
Run Code Online (Sandbox Code Playgroud)
结果将是:
