有没有办法只将颜色添加到基于记录的节点中的字段.如下例所示,字段struct2:f0可以单独使用不同的颜色吗?
digraph structs {
node [shape=record];
struct1 [label="<f0> left|<f1> mid\ dle|<f2> right"];
struct2 [label="<f0> one|<f1> two"];
struct3 [label="hello\nworld |{ b |{c|<here> d|e}| f}| g | h"];
struct1:f1 -> struct2:f0;
struct1:f2 -> struct3:here;
}
Run Code Online (Sandbox Code Playgroud)
谢谢
我喂这个简单的输入脚本定义基于记录节点,以便从它(SVG部分实际上并不重要)创建一个SVG来点:
graph mygraph{
node [shape=record, fontsize=10, fontname=Arial];
rankdir=TB;
ranksep=0.5;
rank=max;
splines=true;
overlap=false;
mindist=0.2;
"d1" [style=solid, label="{\N|{<0> 0|<1> 1}}"];
"d2" [style=solid, label="{\N|{<0> 0|<1> 1|<2> 2|<3> 3}}"];
"d1":0 -- "d2":0[color=blue, penwidth=3, tooltip="d1:0 -- d2:0", URL="#"];
}
Run Code Online (Sandbox Code Playgroud)
这将生成一个图表,其中端口0 d1和端口0 d2由蓝色样条线连接:

精细.
现在我需要着色端口.例如:端口1 d2应为绿色,端口2 d2应为橙色.或者其他的东西.
我该如何实现这一目标?
编辑1:节点周围的实心框架很重要.我需要它为某些节点固定,为其他节点破灭.