The wxGraphLayout class is based on a tool called 'graphplace' by Dr. Jos T.J. van Eijndhoven of Eindhoven University of Technology. Given a (possibly cyclic) directed graph, it does its best to lay out the nodes in a sensible manner. There are many applications (such as diagramming) where it is required to display a graph with no human intervention. Even if manual repositioning is later required, this algorithm can make a good first attempt.
See the separate manual and the directory utils/wxgraph.