digraph { rankdir="BT"; node[shape="circle"]; { node[fillcolor="black", color="black", style=filled, label="", rank="sink"]; a, b, c, d; } { node[fillcolor="white", fontcolor="white" style=filled, label="", rank="source"]; e, f, g; } a -> {e, f}; b -> {f, g}; c -> {e}; d -> {e, f}; }