I have a Graph object that contains a forest with directed trees. I want to draw the forest such that the root of the trees are on the top and the leaves are on the bottom. If I use the following line of code:
Graph[{1, 2, 3, 4, 5, 6, 7}, {1 \[DirectedEdge] 2,
2 \[DirectedEdge] 3, 4 \[DirectedEdge] 6, 5 \[DirectedEdge] 6,
7 \[DirectedEdge] 4}, VertexLabels -> "Name",
GraphLayout -> "LayeredDrawing"]
I get this image:

Everything looks fine except the root (#3) is not on top. How can I resolve the issue?



graph styletobasic blackfrom the context menu. I don't think it changes the semantic that I want to express. – Mohsen Oct 10 '12 at 5:21"RootVertex"suboption of GraphLayout, which might help. – Szabolcs Apr 12 at 21:01