# Clustered graph - edge ltail argument - rendering bug

**URL:** https://forum.graphviz.org/t/clustered-graph-edge-ltail-argument-rendering-bug/1912
**Category:** Uncategorized
**Created:** [December 5, 2023, 3:35pm UTC](https://forum.graphviz.org/t/clustered-graph-edge-ltail-argument-rendering-bug/1912 "2023-12-05T15:35:50Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![vasilyich](https://avatars.discourse-cdn.com/v4/letter/v/13edae/32.png) [@vasilyich](https://forum.graphviz.org/u/vasilyich)
#### Post date: [December 5, 2023, 3:35pm UTC](https://forum.graphviz.org/t/clustered-graph-edge-ltail-argument-rendering-bug/1912/1 "2023-12-05T15:35:50Z")

</div>

Hi everyone,  
I am using graphviz via python to generate svg map of a graph. In my area it is important to be able to draw edges which originate from the cluster itself rather than individual node inside it. I have used ltail argument in order to achive thiis. However, i see that after certain number of edges the drawing becomes a bit broken. please see attached picture.  
On first picture the rendering is good

 ![test01](https://global.discourse-cdn.com/graphviz/original/2X/5/509162e9da4884fd626de28266085ce66fb65f39.jpeg)  
On second picture there is a glitch in rendering edges of the graph as it gets more complex  
 ![test02](https://global.discourse-cdn.com/graphviz/original/2X/a/acc8bdfc206d696f49e473540308dbfe55e94faa.jpeg)

**Code i am using:**

```auto
import graphviz

dot = graphviz.Digraph(format = 'svg')
dot.attr(rankdir='LR', compound='true')
dot.attr('node', backcolor='lightgrey', style='filled', fontname='Microsoft Sans Serif')
dot.attr('edge', fontsize='8', fontname='Microsoft Sans Serif', arrowhead='vee', arrowsize='0.6')

with dot.subgraph(name='cluster1') as c:
   c.attr(label='System A')
   c.node('1', 'Component A1')
   c.node('2', 'Component A2')

with dot.subgraph(name='cluster2') as c:
   c.attr(label='System B')
   c.node('3', 'Component B1')
   c.node('4', 'Component B2')

dot.node('5', 'System C')
dot.node('6', 'System D')

with dot.subgraph(name='cluster3') as c:
   c.attr(label='System E')
   c.node('7', 'Component E1')
   
dot.edge('3', '2', 'labe1', ltail='cluster2')
dot.edge('3', '2', 'label2', ltail='cluster2')
dot.edge('3', '2', 'label3', ltail='cluster2')
dot.edge('3', '2', 'label4', ltail='cluster2')
dot.edge('3', '2', 'label5', ltail='cluster2')

dot.edge('5', '3', 'label6')
dot.edge('6', '4', 'label7')

dot.edge('3', '7', 'label8', ltail='cluster2')
dot.edge('3', '7', 'label9', ltail='cluster2')
dot.edge('3', '7', 'label10', ltail='cluster2')

dot.render('graph', view=True)

```

---

<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: [December 5, 2023, 9:24pm UTC](https://forum.graphviz.org/t/clustered-graph-edge-ltail-argument-rendering-bug/1912/2 "2023-12-05T21:24:23Z")

</div>

I wonder if this is related to

> **[dot crash when rankdir=LR + compound=true; set (#1949) · Issues · graphviz /...](https://gitlab.com/graphviz/graphviz/-/issues/1949)**
>
> Steps to reproduce Call dot with the following command line: dot -o test.png -Tpng test.dot

or

> **[new-ish bug with "compound=true" (dot) (#2447) · Issues · graphviz / graphviz...](https://gitlab.com/graphviz/graphviz/-/issues/2447)**
>
> Steps to reproduce Use of compound=true that worked in dot once upon a time (sorry, no useful timestamp) now displays incorrectyl...

Could you try it with **rankdir=TB**?

---

<div class="post-metadata">

### Author: ![vasilyich](https://avatars.discourse-cdn.com/v4/letter/v/13edae/32.png) [@vasilyich](https://forum.graphviz.org/u/vasilyich)
#### Post date: [December 5, 2023, 10:41pm UTC](https://forum.graphviz.org/t/clustered-graph-edge-ltail-argument-rendering-bug/1912/3 "2023-12-05T22:41:57Z")

</div>

Same issue with Top to Bottom orientation

 ![test03](https://global.discourse-cdn.com/graphviz/original/2X/b/b005b407382c79b4cd8868ab8375582ced57e722.jpeg)

this may be related to the bug reported on compound=True

What i noticed however is that the issue only occurs when i use **ltail** argument. **lhead** works fine.

---

<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: [December 6, 2023, 12:21am UTC](https://forum.graphviz.org/t/clustered-graph-edge-ltail-argument-rendering-bug/1912/4 "2023-12-06T00:21:53Z")

</div>

Please create an issue here: [Issues · graphviz / graphviz · GitLab](https://gitlab.com/graphviz/graphviz/-/issues)
