Graphviz Python draw a C-Net, line connecting edges, dots on edges

214 Views Asked by At

Is it possible with Graphviz to draw nodes/points on edges? I am using graphviz with python. I would like to recreate something like the following, which is called a C-Net:

enter image description here

My ideas so far that haven't lead to a good result yet:

I thought about creating the black dots on the edges by actually creating nodes with edges joining the nodes, however I don't know how to make sure that these edges that are between "a - dot - dot -> b" for example stay on a straight line.

I thought about creating directed edge a -> b and a -> d and then an undirected edge "dot - dot" and positioning the "dot - dot" manually over the two directed edges, but this seems incredibly hacky and I haven't been able to get the position of the directed edge.

Thank you for your help!

1

There are 1 best solutions below

0
On

I worked with Graphviz last year, this seems pretty complicated but maybe it's possible to thicken the edge with penwidth feature in certain areas of the edge (and make it less thick from the center to create a dot in the desired location on the edge).