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
On second picture there is a glitch in rendering edges of the graph as it gets more complex
Code i am using:
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)