How to change arrowhead type?
I want to simulate non-directional graphs with .dot. To that end, I want the arrowhead type to be "none". How do I set this?
"f" -> "t" [label=2],[arrowhead=none]
"m" -> "d" [label=0],[arrowhead=none]
The ab开发者_StackOverflow中文版ove is not working.
"f" -> "t" [label=2, arrowhead=none]
For example:
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;
}
Another nice way is to use the 'dir' attribute:
"f" -> "t" [label=2 dir=none]
"m" -> "d" [label=0 dir=none]
See also http://martin-loetzsch.de/DOTML/dir.html
You can change the arrow head either locally or globally.
digraph G
{
edge[arrowhead="odiamond"]; // Globally
A -> B
A -> C [arrowhead="vee"]; // Locally
C -> D
C -> E
}
You can test it on GraphvizFiddle
All possible values could be found Here
If you don't have to create a digraph
, you can use a graph
:
- Replace
digraph {
on the top of your dot file bygraph {
. - Change your node relationships to:
a -- b;
"f" -> "t" [label=2 arrowhead=none]
"m" -> "d" [label=0 arrowhead=none]
Use headport
instead of arrowhead
. Read the dot guide.
精彩评论