GraphPlot3D

GraphPlot3D[g]

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.

GraphPlot3D[m]

uses the adjacency matrix m to specify the graph g.

Details and Options

Examples

open allclose all

Basic Examples  (3)

Plot a graph in 3D:

Plot a graph specified by edge rules:

Plot a graph specified by its adjacency matrix:

Scope  (12)

Graph Specification  (6)

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:

Use GraphData for collections of graphs:

Use ExampleData for collections of sparse matrices:

Graph Styling  (6)

Give labels for some edges:

Give vertex labels:

Show edges as arrows:

Plot a disconnected graph using different packing methods:

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

Use EdgeShapeFunction and VertexShapeFunction for detailed control:

Options  (71)

DataRange  (1)

Specify the range of vertex coordinates:

DirectedEdges  (1)

Show the direction of edges:

GraphLayout  (66)

"BalloonEmbedding"  (6)

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

"BalloonEmbedding" works best for tree graphs:

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

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

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

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

"BipartiteEmbedding"  (1)

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

"CircularEmbedding"  (2)

Place vertices on a circle:

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

"CircularMultipartiteEmbedding"  (2)

Place vertices on polygon lines based on a vertex partition:

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

"DiscreteSpiralEmbedding"  (3)

Place vertices on a discrete spiral:

"DiscreteSpiralEmbedding" works best for path graphs:

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

"GridEmbedding"  (2)

Place vertices on a grid:

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

"HighDimensionalEmbedding"  (2)

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

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

"LayeredEmbedding"  (6)

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

"LayeredEmbedding" works best for tree graphs:

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

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

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

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

"LayeredDigraphEmbedding"  (3)

Place vertices in a series of layers:

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

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

"LinearEmbedding"  (2)

Place vertices on a line:

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

"MultipartiteEmbedding"  (2)

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

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

"PlanarEmbedding"  (1)

Place vertices on a plane without an edge crossing:

"RadialEmbedding"  (2)

Place vertices in concentric circles:

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

"RandomEmbedding"  (1)

Place vertices randomly:

"SpectralEmbedding"  (2)

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

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

"SpiralEmbedding"  (2)

Place vertices on a spiral:

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

"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:

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

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

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

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

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

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:

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

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

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

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

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

"SpringEmbedding"  (10)

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

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

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

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

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

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

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

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

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

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

"StarEmbedding"  (3)

Place vertices on a star shape:

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

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

"TutteEmbedding"  (2)

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

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

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

Make a 3D graph layout with spheres and cylinders:

Structure an engineering matrix:

Properties & Relations  (7)

Use LayeredGraphPlot for hierarchical-style drawing of directed graphs:

Use TreePlot for different types of tree drawing:

Use GraphPlot to draw graphs in 2D:

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

Get the connectivity and plot it:

Use PolyhedronData for a large collection of polyhedra and properties:

Compare to a predefined embedding:

Use ExampleData for a large collection of sparse matrices:

Use ArrayPlot or MatrixPlot to display sparse matrices:

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).

CMS

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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2024_graphplot3d, organization={Wolfram Research}, title={GraphPlot3D}, year={2019}, url={https://reference.wolfram.com/language/ref/GraphPlot3D.html}, note=[Accessed: 18-November-2024 ]}