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]


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 >
  2. edit all the pos values for edges with penwidth>1 (see and example below)
  3. neato -n2 -Tpng >yourfile.png

(See also the FAQ -

Like so:

digraph {
	graph [bb="0,0,54,108"];
	node [label="\N"];
	A	[height=0.5,
	B	[height=0.5,
	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"];


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.