WOLFRAM

generates a 3D plot of the graph g.

GraphPlot3D[{e1,e2,}]

generates a 3D plot of the graph with edges ei.

GraphPlot3D[{,w[ei],}]

plots ei with features defined by the symbolic wrapper w.

GraphPlot3D[{vi 1vj 1,}]

uses rules vikvjk to specify the graph g.

uses the adjacency matrix m to specify the graph g.

Details and Options

Examples

open allclose all

Basic Examples  (3)Summary of the most common use cases

Plot a graph in 3D:

Out[1]=1

Plot a graph specified by edge rules:

Out[1]=1

Plot a graph specified by its adjacency matrix:

Out[1]=1

Scope  (12)Survey of the scope of standard use cases

Graph Specification  (6)

Specify a graph using a graph:

Out[1]=1

Specify a graph using a rule list:

Out[1]=1

Specify a graph using a dense adjacency matrix:

Out[1]=1

Specify a graph using a sparse adjacency matrix:

Out[1]=1

Use GraphData for collections of graphs:

Out[1]=1

Use ExampleData for collections of sparse matrices:

Out[1]=1

Graph Styling  (6)

Give labels for some edges:

Out[1]=1

Give vertex labels:

Out[1]=1

Show edges as arrows:

Out[1]=1

Plot a disconnected graph using different packing methods:

Out[1]=1

For very large graphs, it is often better not to draw vertices at all:

Out[1]=1

Use EdgeShapeFunction and VertexShapeFunction for detailed control:

Out[1]=1

Options  (71)Common values & functionality for each option

DataRange  (1)

Specify the range of vertex coordinates:

Out[1]=1

DirectedEdges  (1)

Show the direction of edges:

Out[1]=1

GraphLayout  (66)

"BalloonEmbedding"  (6)

Place each vertex in an enclosing circle centered at its parent vertex:

Out[1]=1

"BalloonEmbedding" works best for tree graphs:

Out[1]=1

Use the option "EvenAngle"->True to place vertices evenly in an enclosing circle:

Out[1]=1

With the setting "OptimalOrder"->True, the vertex ordering optimizes the angular resolution and the aspect ratio:

Out[1]=1

Use the option "RootVertex"->v to set the root vertex:

Out[1]=1

Use "SectorAngles"->s to control the size of each sector:

Out[1]=1

"BipartiteEmbedding"  (1)

Place vertices on two vertical lines based on a bipartite partition:

Out[1]=1

"CircularEmbedding"  (2)

Place vertices on a circle:

Out[1]=1

Use the option "Offset"->offset to specify the offset angles:

Out[1]=1

"CircularMultipartiteEmbedding"  (2)

Place vertices on polygon lines based on a vertex partition:

Out[1]=1

Use "VertexPartition"->partition to specify a partition of vertices:

Out[1]=1

"DiscreteSpiralEmbedding"  (3)

Place vertices on a discrete spiral:

Out[1]=1

"DiscreteSpiralEmbedding" works best for path graphs:

Out[1]=1

With the setting "OptimalOrder"True, vertices are reordered so that they lie nicely on a discrete spiral:

Out[1]=1

"GridEmbedding"  (2)

Place vertices on a grid:

Out[1]=1

Use "Dimension"->dim to specify a dimension of a grid:

Out[1]=1

"HighDimensionalEmbedding"  (2)

Place vertices in high dimension according to spring-electrical embedding and project down:

Out[1]=1

Use "RandomSeed"->int to specify a seed for the random number generator that computes the initial vertex placement:

Out[2]=2

"LayeredEmbedding"  (6)

Place vertices in several layers in such a way as to minimize edges between nonadjacent layers:

Out[1]=1

"LayeredEmbedding" works best for tree graphs:

Out[1]=1

Use the option "LayerSizeFunction"->func to specify the relative height:

Out[1]=1

Use the option "RootVertex"->v to set the root vertex:

Out[1]=1

Use the option "LeafDistance"->d to specify the leaf distance:

Out[1]=1

Use the option "Orientation"->o to draw a tree with different orientations:

Out[1]=1

"LayeredDigraphEmbedding"  (3)

Place vertices in a series of layers:

Out[1]=1

Use the option "RootVertex"->v to set the root vertex:

Out[1]=1

Use the option "Orientation"->o to draw a tree with different orientations:

Out[1]=1

"LinearEmbedding"  (2)

Place vertices on a line:

Out[1]=1

Use the option "Method"->m to specify the algorithm:

Out[1]=1

"MultipartiteEmbedding"  (2)

Place vertices on multiple line grids based on a vertex partition:

Out[1]=1

Use "VertexPartition"->partition to specify a partition of vertices:

Out[1]=1

"PlanarEmbedding"  (1)

Place vertices on a plane without an edge crossing:

Out[1]=1

"RadialEmbedding"  (2)

Place vertices in concentric circles:

Out[1]=1

Use the option "RootVertex"->v to set the root vertex:

Out[1]=1

"RandomEmbedding"  (1)

Place vertices randomly:

Out[1]=1

"SpectralEmbedding"  (2)

Place vertices so the weighted sum of squares of mutual distances is minimized:

Out[1]=1

Use the option "RelaxationFactor"->r to get the layout based on a relaxed Laplace matrix.

Out[1]=1

"SpiralEmbedding"  (2)

Place vertices on a spiral:

Out[1]=1

With the setting "OptimalOrder"->True, vertices are reordered so that they lie on the spiral nicely:

Out[1]=1

"SpringElectricalEmbedding"  (12)

Place vertices so that they minimize mechanical and electrical energy when each vertex has a charge and each edge corresponds to a spring:

Out[1]=1

With the setting "EdgeWeighted"->True, edge weights are used:

Out[2]=2

Use the option "EnergyControl"->e to specify limitations on the total energy of the system during minimization:

Out[2]=2

Use "InferentialDistance"->d to specify a cutoff distance beyond which the interaction between vertices is assumed to be nonexistent:

Out[2]=2

Use "MaxIteration"->it to specify a maximum number of iterations to be used in attempting to minimize the energy:

Out[2]=2

Use "Multilevel"->method to specify a method used during a recursive procedure of coarsening a graph:

Out[2]=2

With the setting "Octree"->True, an octree data structure (in three dimensions) or a quadtree data structure (in two dimensions) is used in the calculation of repulsive force:

Out[2]=2

Use "RandomSeed"->int to specify a seed for the random number generator that computes the initial vertex placement:

Out[2]=2

Use "RepulsiveForcePower"->r to control how fast the repulsive force decays over distance:

Out[2]=2

Use "StepControl"->method to define how step length is modified during energy minimization:

Out[2]=2

Use "StepLength"->r to specify the initial step length used in moving the vertices around:

Out[2]=2

Use "Tolerance"->r to specify the tolerance used in terminating the energy minimization process:

Out[2]=2

"SpringEmbedding"  (10)

Place vertices so that they minimize mechanical energy when each edge corresponds to a spring:

Out[1]=1

With the setting "EdgeWeighted"->True, edge weights are used:

Out[2]=2

Use the option "EnergyControl"->e to specify limitations on the total energy of the system during minimization:

Out[2]=2

Use "InferentialDistance"->d to specify a cutoff distance beyond which the interaction between vertices is assumed to be nonexistent:

Out[2]=2

Use "MaxIteration"->it to specify a maximum number of iterations to be used in attempting to minimize the energy:

Out[2]=2

Use "Multilevel"->method to specify a method used during a recursive procedure of coarsening a graph:

Out[2]=2

Use "RandomSeed"->int to specify a seed for the random number generator that computes the initial vertex placement:

Out[2]=2

Use "StepControl"->method to define how step length is modified during energy minimization:

Out[2]=2

Use "StepLength"->r to specify the initial step length used in moving the vertices around:

Out[2]=2

Use "Tolerance"->r to specify the tolerance used in terminating the energy minimization process:

Out[2]=2

"StarEmbedding"  (3)

Place vertices on a star shape:

Out[1]=1

Use the option "Offset"->offset to specify the offset angles:

Out[1]=1

Use the option "Center"->center to specify the center:

Out[1]=1

"TutteEmbedding"  (2)

Place vertices without crossing edges and minimize the sum of distances to neighbors:

Out[1]=1

"TutteEmbedding" works for 3-connected planar graphs only:

Out[1]=1

PlotStyle  (3)

Specify an overall style for the graph:

Out[1]=1

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

Out[1]=1

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

Out[1]=1

Applications  (2)Sample problems that can be solved with this function

Make a 3D graph layout with spheres and cylinders:

Out[1]=1

Structure an engineering matrix:

Out[1]=1

Properties & Relations  (7)Properties of the function, and connections to other functions

Use LayeredGraphPlot for hierarchical-style drawing of directed graphs:

Out[1]=1

Use TreePlot for different types of tree drawing:

Out[1]=1

Use GraphPlot to draw graphs in 2D:

Out[1]=1

Use GraphData for an extensive collection of predefined graphs and properties:

Get the connectivity and plot it:

Out[2]=2
Out[3]=3

Use PolyhedronData for a large collection of polyhedra and properties:

Out[1]=1
Out[2]=2

Compare to a predefined embedding:

Out[3]=3

Use ExampleData for a large collection of sparse matrices:

Out[1]=1

Use ArrayPlot or MatrixPlot to display sparse matrices:

Out[1]=1
Out[2]=2
Wolfram Research (2007), GraphPlot3D, Wolfram Language function, https://reference.wolfram.com/language/ref/GraphPlot3D.html (updated 2019).
Wolfram Research (2007), GraphPlot3D, Wolfram Language function, https://reference.wolfram.com/language/ref/GraphPlot3D.html (updated 2019).

Text

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

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

CMS

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

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

APA

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

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

BibTeX

@misc{reference.wolfram_2025_graphplot3d, author="Wolfram Research", title="{GraphPlot3D}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/GraphPlot3D.html}", note=[Accessed: 31-March-2025 ]}

@misc{reference.wolfram_2025_graphplot3d, author="Wolfram Research", title="{GraphPlot3D}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/GraphPlot3D.html}", note=[Accessed: 31-March-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_graphplot3d, organization={Wolfram Research}, title={GraphPlot3D}, year={2019}, url={https://reference.wolfram.com/language/ref/GraphPlot3D.html}, note=[Accessed: 31-March-2025 ]}

@online{reference.wolfram_2025_graphplot3d, organization={Wolfram Research}, title={GraphPlot3D}, year={2019}, url={https://reference.wolfram.com/language/ref/GraphPlot3D.html}, note=[Accessed: 31-March-2025 ]}