LayeredGraphPlot

LayeredGraphPlot[g]

generates a layered plot of the graph g.

LayeredGraphPlot[{e1,e2,}]

generates a layered plot of the graph with edges ej.

LayeredGraphPlot[{,w[ei],}]

plots ei with features defined by the symbolic wrapper w.

LayeredGraphPlot[{vi 1vj 1,}]

uses rules vikvjk to specify the graph g.

LayeredGraphPlot[m]

uses the adjacency matrix m to specify the graph g.

LayeredGraphPlot[,vpos]

places the dominant vertex v in the plot at position pos.

Details and Options

Examples

open allclose all

Basic Examples  (4)

Plot a graph:

Plot a graph specified by edge rules:

Plot a graph specified by its adjacency matrix:

Drawing a graph with different orientation from the default:

Scope  (9)

Graph Specification  (4)

Specify a graph using a graph:

Specify a graph using a rule list:

Specify a graph using a dense adjacency matrix:

Specify a graph using a sparse adjacency matrix:

Graph Styling  (5)

Give labels for some edges:

Give vertex labels:

Show edges as lines:

Plot a disconnected graph using different packing methods:

Draw with different orientations:

Options  (6)

DataRange  (1)

Specify the range of vertex coordinates:

DirectedEdges  (2)

By default edges are shown as arrows:

Do not show the direction of edges:

PlotStyle  (3)

Specify an overall style for the graph:

PlotStyle can be combined with VertexShapeFunction, which has higher priority:

PlotStyle can be combined with EdgeShapeFunction, which has higher priority:

Applications  (5)

A food chain:

A chart showing the relationships between shapes:

A flow chart for a computer program:

A visual representation of a straight-line program, used for common subexpression elimination:

The relationships between early versions of the Unix operating system:

Properties & Relations  (3)

TreePlot provides a layered layout ignoring the direction of edges:

Use GraphPlot or GraphPlot3D for general undirected graph drawing:

Use ArrayPlot or MatrixPlot to display matrices:

Possible Issues  (1)

When vertex coordinates are specified, all edges are shown as straight lines:

If explicit vertex coordinates are not specified, curved edges will be used:

Neat Examples  (1)

Plot isotope decay networks:

Uranium-235:

Polonium-189:

Plutonium-239:

Introduced in 2007
 (6.0)
 |
Updated in 2019
 (12.0)
2020
 (12.1)