Graphviz 如何显示节点的相同标题
我想在维基上画RB树 但我找不到为不同节点显示相同标题的可能性(在本例中为nil-nodes)。有可能吗Graphviz 如何显示节点的相同标题,graphviz,Graphviz,我想在维基上画RB树 但我找不到为不同节点显示相同标题的可能性(在本例中为nil-nodes)。有可能吗 digraph "rb-tree"{ bgcolor = whitesmoke; forcelabels = true; margin = 0; node [shape = circle, style = filled, fontsize = 14, margin = 0, fillcolor = black
digraph "rb-tree"{
bgcolor = whitesmoke;
forcelabels = true;
margin = 0;
node [shape = circle,
style = filled,
fontsize = 14,
margin = 0,
fillcolor = black,
fontcolor = white];
edge [fontsize = 10,
arrowhead = vee];
8 [fillcolor = red];
17 [fillcolor = red];
nil_8l [shape = box];
nil_8r [shape = box];
nil_17l [shape = box];
nil_17r [shape = box];
13->8;
13->17;
8->nil_8l;
8->nil_8r;
17->nil_17l;
17->nil_17r;
}
Graphiz可以设置标签。因此,请使用:
digraph "rb-tree"{
bgcolor = whitesmoke;
forcelabels = true;
margin = 0;
node [shape = circle,
style = filled,
fontsize = 14,
margin = 0,
fillcolor = black,
fontcolor = white];
edge [fontsize = 10,
arrowhead = vee];
8 [fillcolor = red];
17 [fillcolor = red];
nil_8l [shape = box label="nil"];
nil_8r [shape = box label="nil"];
nil_17l [shape = box label="nil"];
nil_17r [shape = box label="nil"];
13->8;
13->17;
8->nil_8l;
8->nil_8r;
17->nil_17l;
17->nil_17r;
}
这个问题很模糊。为落选做好准备。不是我说的,但是…欢迎来到Stack Overflow。请拿着这本书学习。然后,给我们一个清晰的描述,你想做什么,你错了什么,你期望得到什么,以及一个简单的答案。