考虑这个dot语言代码:
digraph graphname {
subgraph clusterA {
node [shape=plaintext,style=filled];
1 -> 2 [arrowhead=normal,arrowtail=dot];
2 -> 3 -> X2 -> 5;
6;
7;
label = "A";
color=blue
}
}
Run Code Online (Sandbox Code Playgroud)
在上面的示例中,只有1 -> 2连接将arrowhead=normal,arrowtail=dot应用样式; 所有其他箭头将是"默认"样式.
我的问题是 - 如何设置箭头样式(对于整个子图 - 或整个图形),而不必[arrowhead=normal,arrowtail=dot];在每个边连接旁边复制粘贴" "?
编辑:仅供参考 - 杰西的答案不包含任何代码; 我写了那个片段并在这里占据了这个空间 - 由于不明原因,主持人将其从这里剪掉并粘贴到Jesse的答案中.
Jes*_*seW 36
使用edge属性语句,如DOT语言文档中所述.
digraph graphname {
subgraph clusterA {
node [shape=plaintext,style=filled];
edge [arrowhead=normal,arrowtail=dot];
1 -> 2 ;
2 -> 3 -> X2 -> 5;
6;
7;
label = "A";
color=blue
}
}
Run Code Online (Sandbox Code Playgroud)