LayeredGraphPlot

LayeredGraphPlot[{vi1->vj1, vi2->vj2, ...}]
generates a layered plot of the graph in which vertex is connected to vertex .

LayeredGraphPlot[{{vi1->vj1, lbl1}, ...}]
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

ExamplesExamplesopen allclose all

Basic Examples (5)Basic Examples (5)

Draw a directed graph using a hierarchical layout:

In[1]:=
Click for copyable input
Out[1]=

Include vertex labels:

In[1]:=
Click for copyable input
Out[1]=

Show edge labels:

In[1]:=
Click for copyable input
Out[1]=

Draw a graph specified by its adjacency matrix:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=

Drawing a graph with different orientation from the default:

In[1]:=
Click for copyable input
Out[1]=
New in 6
New to Mathematica? Find your learning path »
Have a question? Ask support »