我想用.dot模拟非方向图.为此,我希望箭头类型为"无".我该如何设置?
"f" -> "t" [label=2],[arrowhead=none]
"m" -> "d" [label=0],[arrowhead=none]
Run Code Online (Sandbox Code Playgroud)
以上不起作用.
小智 25
"f" -> "t" [label=2, arrowhead=none]
Run Code Online (Sandbox Code Playgroud)
例如:
digraph g {
rankdir="LR";
dpi=300;
node[
fontname="Arial",
shape="square",
fixedsize=false,
width=1.809,
style=rounded
];
edge [
arrowhead="none"
];
Node1 -> Node2;
Node2 -> Node3;
Node3 -> Node4;
}
Run Code Online (Sandbox Code Playgroud)
另一个好方法是使用'dir'属性:
"f" -> "t" [label=2 dir=none]
"m" -> "d" [label=0 dir=none]
Run Code Online (Sandbox Code Playgroud)
另见http://martin-loetzsch.de/DOTML/dir.html
您可以在本地或全局更改箭头。
digraph G
{
edge[arrowhead="odiamond"]; // Globally
A -> B
A -> C [arrowhead="vee"]; // Locally
C -> D
C -> E
}
Run Code Online (Sandbox Code Playgroud)
您可以在GraphvizFiddle上对其进行测试
所有可能的值都可以在这里找到
小智 5
"f" -> "t" [label=2 arrowhead=none]
"m" -> "d" [label=0 arrowhead=none]
Run Code Online (Sandbox Code Playgroud)