Allign node's stroke with end of the arrow's path width

Hi all,

When you have graphs with a significant edgewidth.

for instance:

digraph {
    A -> B [penwidth=10]
}

Capture

It seems like the fill of the arrow-head aligns with the fill of the nodes shape, i.e. the stroke or border of the arrow overlaps significantly with the node…

Is there a way to counteract this behavior, e.g. using a do-not-overlap setting or manually adding an offset between the arrowhead and the node.

Yep, looks like a bug to me. You get the same result with png and svg. I’m surprised this hasn’t been reported before.
The only work-around I found was this:

  1. dot -T dot yourfile.gv >yourfile.dot
  2. edit all the pos values for edges with penwidth>1 (see https://www.graphviz.org/doc/info/attrs.html#k:splineType and example below)
  3. neato -n2 -Tpng youreditedfile.dot >yourfile.png

(See also the FAQ - https://www.graphviz.org/faq/#FaqDotWithCoords)

Like so:

digraph {
	graph [bb="0,0,54,108"];
	node [label="\N"];
	A	[height=0.5,
		pos="27,90",
		width=0.75];
	B	[height=0.5,
		pos="27,18",
		width=0.75];
	A -> B	[penwidth=10,
		 //pos="e,27,36.104 27,71.697 27,63.983 27,54.712 27,46.112"];
	pos="e,27,44.104 27,71.697 27,63.983 27,54.712 27,46.112"];
}

Giving:
fatEdge0

Well I’ve known about the bug for almost two years. But I just put up with it since I saw no alternatives… I only recently was pointed to the forums

Note that this happens to me even with the most simple of graphs, with the default settings. E.g. see this graph and its PDF output.

digraph {
    a -> b;
}

I personally find it a real eye sore. Another eye sore is that the label of a vertically straight edge touches the edge. Both problems visible in the image below.