In the tutorial entitled "Hierarchical Drawing of Directed Graphs" in Mathematica 12, there is an example of how to draw a graph with several properties I want, but it uses an option called VertexRenderingFunction
which is superseded by VertexShapeFunction
:
LayeredGraphPlot[{1 -> 2, 2 -> 3, 3 -> 4, 4 -> 5, 5 -> 6, 6 -> 7,
7 -> 8, 8 -> 1, 1 -> 9, 2 -> 9, 3 -> 10, 4 -> 10, 6 -> 11, 5 -> 11,
7 -> 12, 8 -> 12}, Left,
VertexRenderingFunction -> ({EdgeForm[Black], Yellow, Disk[#1, 0.2],
Black, Text[#2, #1]} &)]
Since I'm trying to draw a finite-state automaton, I want a graph with directed arrows between nodes, where the nodes are circles containing a small number (the state number), as well as labels on the edges. I'm only trying to display acyclic automata at this point.
Trying to get VertexShapeFunction
to do these things somehow suppressed the directed arrows; what is the proper way to do this? Ideally there would be the usual notations for the start state and final states as well. Thanks