SOLUTIONS

BUILTIN MATHEMATICA SYMBOL
LayeredGraphPlot
LayeredGraphPlot[{v_{i1}>v_{j1}, v_{i2}>v_{j2}, ...}]
generates a layered plot of the graph in which vertex is connected to vertex .
LayeredGraphPlot[{{v_{i1}>v_{j1}, lbl_{1}}, ...}]
associates labels with edges in the graph.
LayeredGraphPlot[g, pos]
places the dominant vertices in the plot at position pos.
LayeredGraphPlot[m]
generates a layered plot of the graph represented by the adjacency matrix m.
Details and OptionsDetails and Options
 LayeredGraphPlot attempts to draw the vertices of a graph in a series of "layers".
 LayeredGraphPlot by default puts "dominant" vertices at the top, and puts vertices lower in the "hierarchy" progressively further down.
 LayeredGraphPlot[g, pos] places the dominant vertices at position pos. Possible positions are: Top, Bottom, Left, Right.
 The vertex names and the labels can be any expressions.
 LayeredGraphPlot has the same options as Graphics, with the following additions and changes:

DataRange Automatic the range of vertex coordinates to generate DirectedEdges True whether to show edges as directed arrows EdgeLabeling True whether to include labels given for edges EdgeRenderingFunction Automatic function to give explicit graphics for edges Frame False whether to draw a frame around the plot FrameTicks None what ticks to include on the frame MultiedgeStyle Automatic how to draw multiple edges between vertices PackingMethod Automatic the method to use for packing components PlotRangePadding Automatic how much padding to include around the plot PlotStyle Automatic overall graphics directives for vertices and edges SelfLoopStyle Automatic how to draw edges linking a vertex to itself VertexCoordinateRules Automatic rules for explicit vertex coordinates VertexLabeling Automatic whether to show vertex names as labels VertexRenderingFunction Automatic function to give explicit graphics for vertices  With the default setting VertexLabeling>Automatic, vertices are displayed as points, with their names given in tooltips, so long as the number of vertices is not too large.
 Tooltip[v_{k}, vlab] can be used to specify an alternative tooltip for a vertex. Tooltip[v_{i}>v_{j}, lbl] specifies a tooltip for an edge.
 Explicit settings for VertexRenderingFunction and EdgeRenderingFunction override settings for VertexLabeling, EdgeLabeling, and DirectedEdges.
 With VertexRenderingFunction>f, each vertex is rendered with the graphics primitives given by , where is the position where the vertex is being placed, and is its name.
 With EdgeRenderingFunction>g, each edge is rendered with the graphics primitives given by , where , are the beginning and ending points of the edge, , are the beginning and ending vertices, and is any label specified for the edge.
 The graphics primitives obtained by applying by EdgeRenderingFunction and VertexRenderingFunction are in effect directly spliced into the graphic generated by LayeredGraphPlot. Inset can be used to insert an arbitrary expression.
 In the graphics generated by LayeredGraphPlot, edges are effectively drawn first, and vertices afterwards.
 The graph does not need to be connected. Disconnected components are typically arranged so as to fill area roughly uniformly.
 When a graph is specified by an adjacency matrix, the names of its vertices are taken to be successive integers starting at 1.
 The adjacency matrix m in LayeredGraphPlot[m] can be a SparseArray object.
 With the default setting MultiedgeStyle>Automatic, multiple edges are not shown if the graph is specified by an adjacency matrix.
 LayeredGraphPlot returns an object of the form Graphics[Annotation[data, VertexCoordinateRules>rules]].
New in 6
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »