An arrow from edge to node

Hello
I want to draw a family tree using python+graphviz
everything’s ok but I want to draw an arrow from an edge not from a node. Is this possible in Graphviz?

I don’t think arrows from an edge is possible in Graphviz.

Maybe making an invisible node would solve your problem? Then you can have edges going into the invisible node and out from it

Maybe you could say some more about what you want to achieve? maybe attach a drawing of what you want it to look like?

Yes exactly
I tried to convert an edge into an invisible node but couldn’t get the result.
please look the attached photo. that’s exactly what I want

As you see in the picture , I want to show common child of a couple with an arrow from the line between them

I can’t figure out how to do the double lines at the top, but here’s the rest:

[dot verbose=true]

digraph {
    node [shape=box]
    {
        rank=same
        edge [dir=none]
        invis1 [shape=point style=invis]
        invis2 [shape=point style=invis]
        Julie -> invis1 [headclip=false]
        invis1 -> John [tailclip=false]
        John -> invis2 [headclip=false]
        invis2 -> Sara [tailclip=false]
    }
    edge [arrowhead=open]
    invis1 -> Henry [tailclip=false]
    invis2 -> William [tailclip=false]
}

[/dot]

Thank you sooo much.
This is exactly what I want
Don’t worry about double line , I will find something for it
But is your code in python ? Because when I write it in VScode , it gets lots of syntax error

1 Like

No, it’s pure DOT source code.

oh then firstly I need to see how DOT source code works and then transfer it to python. right ?

additionally do you guys have a telegram group for helping each other and asking questions and stuff?

This forum is about the underlying Graphviz software, which your Python code is probably wrapping. The underlying Graphviz software takes in DOT source, and Python wrappers usually convert your code into DOT source for Graphviz.

This forum is the closest thing we have to such a telegram group :slight_smile:

found a way to do the double-line when visiting the thread a few months later. This example has 2 variations in the separation between the lines.

digraph {
    node [shape=box]
    {
        rank=same
        edge [dir=none]
        invis1 [shape=point style=invis]
        invis2 [shape=point style=invis]
        Julie -> invis1 [headclip=false][color="black:black"]
        invis1 -> John [tailclip=false][color="black:black"]
        John -> invis2 [headclip=false][color="black:invis:black"]
        invis2 -> Sara [tailclip=false][color="black:invis:black"]
    }
    edge [arrowhead=open]
    invis1 -> Henry [tailclip=false]
    invis2 -> William [tailclip=false]
}

image