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  (5)

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:

Specify the root node:

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:

Wolfram Research (2007), LayeredGraphPlot, Wolfram Language function, https://reference.wolfram.com/language/ref/LayeredGraphPlot.html (updated 2020).

Text

Wolfram Research (2007), LayeredGraphPlot, Wolfram Language function, https://reference.wolfram.com/language/ref/LayeredGraphPlot.html (updated 2020).

CMS

Wolfram Language. 2007. "LayeredGraphPlot." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/LayeredGraphPlot.html.

APA

Wolfram Language. (2007). LayeredGraphPlot. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/LayeredGraphPlot.html

BibTeX

@misc{reference.wolfram_2024_layeredgraphplot, author="Wolfram Research", title="{LayeredGraphPlot}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/LayeredGraphPlot.html}", note=[Accessed: 24-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_layeredgraphplot, organization={Wolfram Research}, title={LayeredGraphPlot}, year={2020}, url={https://reference.wolfram.com/language/ref/LayeredGraphPlot.html}, note=[Accessed: 24-December-2024 ]}