# Dir="none" not respected when headPos is specified

**URL:** <https://forum.graphviz.org/t/dir-none-not-respected-when-headpos-is-specified/2144>\
**Category:** Help\
**Created:** [April 21, 2024, 12:35am UTC](https://forum.graphviz.org/t/dir-none-not-respected-when-headpos-is-specified/2144 "2024-04-21T00:35:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ralmond](https://sea2.discourse-cdn.com/graphviz/user_avatar/forum.graphviz.org/ralmond/32/1405_2.png) [@ralmond](https://forum.graphviz.org/u/ralmond)\
**Post date:** [April 21, 2024, 12:35am UTC](https://forum.graphviz.org/t/dir-none-not-respected-when-headpos-is-specified/2144/1 "2024-04-21T00:35:01Z")

</div>

I’m trying to make a simple graph with vertically stacked nodes and and an edge looping back up from the bottom to the top. I’ve set a couple of invisible nodes on either side of the real ones and I can route the arrows through there. I only want the arrowheads on the last link in the path.

Here is my example:

```auto
digraph ESP4 {
  
  compound=true;
  rankdir="TB";
  node [shape="rectangle",style="rounded"]
  
  subgraph clust_AS {
    rank="min"
    AS0[label="",fixedsize="true",height=0,width=0,style="invis"]
    AS[label="Activity Selection"]
    AS1[label="",fixedsize="true",height=0,width=0,style="invis"]
    AS0 -> AS -> AS1 [style="invis"]
  }

  subgraph clust_EA {
    rank="max"
    EA0[label="",fixedsize="true",height=0,width=0,style="invis"]
    EA[label="Evidence Accumulation"]
    EA1[label="",fixedsize="true",height=0,width=0,style="invis"]
    EA0 -> EA -> EA1 [style="invis"]
  }

  AS -> EA
  AS0 -> EA0 [style="invis"]
  AS1 -> EA1 [style="invis"]
  EA -> EA1 [style="dashed", tailport="e", dir="none"]
  EA1 -> AS1 [style="dashed", dir="none", splines="false"]
  AS1 -> AS [style="dashed", headport="e"] 
  EA -> EA0 [style="dashed", dir="none"]
  EA0 -> AS0 [style="dashed", dir="none", splines="false"]
  AS0 -> AS [style="dashed"] 
 
}

```

This yields an arrowhead going from EA to EA1, despite the `dir="none"` attribute on that edge.

If I remove the `tailport` attribute, then the arrowhead goes away, but the tail of the edge attaches to the NE corner of the EA node.

I’m running `dot - graphviz version 2.43.0 (0)`

Thanks in advance for any suggestions.

---

<div class="post-metadata">

**Author:** ![steveroush](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@steveroush](https://forum.graphviz.org/u/steveroush)\
**Post date:** [April 21, 2024, 2:35am UTC](https://forum.graphviz.org/t/dir-none-not-respected-when-headpos-is-specified/2144/2 "2024-04-21T02:35:39Z")

</div>

[note that 2.43.0 is pretty old, but that is causing the problem]

This is a bug, probably related to these two:

- [ports plus dir lead to arrowhead on wrong end (#2531) · Issues · graphviz / graphviz · GitLab](https://gitlab.com/graphviz/graphviz/-/issues/2531)
- [arrowhead missing from tail-end of edge (#2437) · Issues · graphviz / graphviz · GitLab](https://gitlab.com/graphviz/graphviz/-/issues/2437)

The good-ish news is that there is an easy work-around - instead of **dir=none** use **arrowhead=none** ([arrowhead | Graphviz](https://graphviz.org/docs/attrs/arrowhead/)), like so:

```auto
digraph ESP4 {
  
  compound=true;
  rankdir="TB";
  node [shape="rectangle",style="rounded"]
  
  subgraph clust_AS {
    rank="min"
    AS0[label="",fixedsize="true",height=0,width=0,style="invis"]
    AS[label="Activity Selection"]
    AS1[label="",fixedsize="true",height=0,width=0,style="invis"]
    AS0 -> AS -> AS1 [style="invis"]
  }

  subgraph clust_EA {
    rank="max"
    EA0[label="",fixedsize="true",height=0,width=0,style="invis"]
    EA[label="Evidence Accumulation"]
    EA1[label="",fixedsize="true",height=0,width=0,style="invis"]
    EA0 -> EA -> EA1 [style="invis"]
  }

  AS -> EA
  AS0 -> EA0 [style="invis"]
  AS1 -> EA1 [style="invis"]
  EA-> EA1 [style="dashed", tailport="e", arrowhead=none] // set arrowhead to none
  EA1 -> AS1 [style="dashed", dir="none", splines="false"]
  AS1 -> AS [style="dashed", headport="e"] 
  EA -> EA0 [style="dashed", dir="none"]
  EA0 -> AS0 [style="dashed", dir="none", splines="false"]
  AS0 -> AS [style="dashed"] 
 
}

```

Giving:  
 ![badDir1](https://global.discourse-cdn.com/graphviz/original/2X/6/637091797839e7d3388bbb31d424a02e5f3fa27b.png)
