Graphviz:如果节点已经有标签,如何为箭头添加标签
Graphviz: How to add label to arrows if nodes already have a label
我正在使用 graphviz 点制作图表。
像这样
digraph protocol {
label="Protocol workflow";
node[shape=box, style=rounded];
a[label="Byte received"];
b[label="Is start delimiter?", shape=diamond];
c[label="Recv length [n, 1B]"]; c1[label="Set count=n"];
d[label="Recv 1 payload byte and decrement count"];
e[label="count > 0", shape=diamond];
f[label="Recv CRC [2B]"];
g[label="Is CRC valid?", shape=diamond];
a -> b -> c -> c1 -> d -> e -> f -> g;
e -> d;
}
问题是我需要为某些箭头添加 yes no 标签,但我不知道该怎么做。
您可以像这样向边缘添加标签:
e -> f [label="Yes"];
我正在使用 graphviz 点制作图表。
像这样
digraph protocol {
label="Protocol workflow";
node[shape=box, style=rounded];
a[label="Byte received"];
b[label="Is start delimiter?", shape=diamond];
c[label="Recv length [n, 1B]"]; c1[label="Set count=n"];
d[label="Recv 1 payload byte and decrement count"];
e[label="count > 0", shape=diamond];
f[label="Recv CRC [2B]"];
g[label="Is CRC valid?", shape=diamond];
a -> b -> c -> c1 -> d -> e -> f -> g;
e -> d;
}
问题是我需要为某些箭头添加 yes no 标签,但我不知道该怎么做。
您可以像这样向边缘添加标签:
e -> f [label="Yes"];