GraphPlot3D
✖
GraphPlot3D
Details and Options




- GraphPlot3D attempts to place vertices in 3D to give a well-laid-out version of the graph.
- GraphPlot3D supports the same vertices, edges and wrappers as Graph.
- The following special wrappers can be used for the edges ei:
-
Annotation[ei,label] provide an annotation Button[ei,action] define an action to execute when the element is clicked EventHandler[ei,…] define a general event handler for the element Hyperlink[ei,uri] make the element act as a hyperlink Labeled[ei,…] display the element with labeling PopupWindow[ei,cont] attach a popup window to the element StatusArea[ei,label] display in the status area when the element is moused over Style[ei,opts] show the element using the specified styles Tooltip[ei,label] attach an arbitrary tooltip to the element - GraphPlot3D has the same options as Graphics3D, with the following additions and changes: [List of all options]
-
DataRange Automatic the range of vertex coordinates to generate DirectedEdges False whether to interpret Rule as DirectedEdge EdgeLabels None labels and placements for edges EdgeLabelStyle Automatic style to use for edge labels EdgeShapeFunction Automatic generate graphic shapes for edges EdgeStyle Automatic styles for edges GraphLayout Automatic how to lay out vertices and edges GraphHighlight {} vertices and edges to highlight GraphHighlightStyle Automatic style for highlight Method Automatic method to use PerformanceGoal Automatic aspects of performance to try to optimize PlotStyle Automatic graphics directives to determine styles PlotTheme Automatic overall theme for the graph VertexCoordinates Automatic coordinates for vertices VertexLabels None labels and placements for vertices VertexLabelStyle Automatic style to use for vertex labels VertexShape Automatic graphic shape for vertices VertexShapeFunction Automatic generate graphic shapes for vertices VertexSize Automatic size of vertices VertexStyle Automatic styles for vertices - With the setting VertexCoordinates->Automatic, the embedding of vertices and routing of edges is computed automatically, based on the setting for GraphLayout.
- Possible special embeddings for GraphLayout include:
-
"BipartiteEmbedding" vertices on two parallel lines "CircularEmbedding" vertices on a circle "CircularMultipartiteEmbedding" vertices on segments of a circle "DiscreteSpiralEmbedding" vertices on a discrete spiral "GridEmbedding" vertices on a grid "LinearEmbedding" vertices on a line "MultipartiteEmbedding" vertices on several parallel lines "SpiralEmbedding" vertices on a 3D spiral projected to 2D "StarEmbedding" vertices on a circle with a center - Possible structured embeddings for layered graphs such as trees and directed acyclic graphs include:
-
"BalloonEmbedding" vertices on a circle with the center at the parent vertex "RadialEmbedding" vertices on a circular segment "LayeredDigraphEmbedding" vertices on parallel lines for directed acyclic graphs "LayeredEmbedding" vertices on parallel lines - Possible optimizing embeddings all minimize a quantity and include:
-
"HighDimensionalEmbedding" energy for spring-electrical in high dimension "PlanarEmbedding" number of edge crossings "SpectralEmbedding" weighted sum of squares distances "SpringElectricalEmbedding" energy with edges as springs and vertices as charges "SpringEmbedding" energy with edges as springs "TutteEmbedding" number of edge crossings and distance to neighbors - Possible settings for PlotTheme include common base themes, color feature themes, font features themes, and size features themes.
-
"Business" a bright, modern look appropriate for business presentations or infographics "Detailed" identify data by employing labels and tooltips "Marketing" elegant, eye-catching design suitable for marketing needs "Minimal" simple graph "Monochrome" single-color design "Scientific" candid design useful for analyzing detailed data with labels and tooltips "Web" clean, bold design suitable for a consumer website or blog "Classic" historical design of graph to remain compatible with existing uses - Graph features themes affect plot of vertices and edges. Feature themes include:
-
"LargeGraph" large graph "ClassicLabeled" classic graph "IndexLabeled" index-labeled graph -
AlignmentPoint Center the default point in the graphic to align with AspectRatio Automatic ratio of height to width Axes False whether to draw axes AxesEdge Automatic on which edges to put axes AxesLabel None axes labels AxesOrigin Automatic where axes should cross AxesStyle {} graphics directives to specify the style for axes Background None background color for the plot BaselinePosition Automatic how to align with a surrounding text baseline BaseStyle {} base style specifications for the graphic Boxed True whether to draw the bounding box BoxRatios Automatic bounding 3D box ratios BoxStyle {} style specifications for the box ClipPlanes None clipping planes ClipPlanesStyle Automatic style specifications for clipping planes ContentSelectable Automatic whether to allow contents to be selected ControllerLinking False when to link to external rotation controllers ControllerPath Automatic what external controllers to try to use DataRange Automatic the range of vertex coordinates to generate DirectedEdges False whether to interpret Rule as DirectedEdge EdgeLabels None labels and placements for edges EdgeLabelStyle Automatic style to use for edge labels EdgeShapeFunction Automatic generate graphic shapes for edges EdgeStyle Automatic styles for edges Epilog {} 2D graphics primitives to be rendered after the main plot FaceGrids None grid lines to draw on the bounding box FaceGridsStyle {} style specifications for face grids FormatType TraditionalForm default format type for text GraphHighlight {} vertices and edges to highlight GraphHighlightStyle Automatic style for highlight GraphLayout Automatic how to lay out vertices and edges ImageMargins 0. the margins to leave around the graphic ImagePadding All what extra padding to allow for labels, etc. ImageSize Automatic absolute size at which to render the graphic LabelStyle {} style specifications for labels Lighting Automatic simulated light sources to use Method Automatic method to use PerformanceGoal Automatic aspects of performance to try to optimize PlotLabel None a label for the plot PlotRange All range of values to include PlotRangePadding Automatic how much to pad the range of values PlotRegion Automatic final display region to be filled PlotStyle Automatic graphics directives to determine styles PlotTheme Automatic overall theme for the graph PreserveImageOptions Automatic whether to preserve image options when displaying new versions of the same graphic Prolog {} 2D graphics primitives to be rendered before the main plot RotationAction "Fit" how to render after interactive rotation SphericalRegion Automatic whether to make the circumscribing sphere fit in the final display area Ticks Automatic specification for ticks TicksStyle {} style specification for ticks TouchscreenAutoZoom False whether to zoom to fullscreen when activated on a touchscreen VertexCoordinates Automatic coordinates for vertices VertexLabels None labels and placements for vertices VertexLabelStyle Automatic style to use for vertex labels VertexShape Automatic graphic shape for vertices VertexShapeFunction Automatic generate graphic shapes for vertices VertexSize Automatic size of vertices VertexStyle Automatic styles for vertices ViewAngle Automatic angle of the field of view ViewCenter Automatic point to display at the center ViewMatrix Automatic explicit transformation matrix ViewPoint {1.3,-2.4,2.} viewing position ViewProjection Automatic projection method for rendering objects distant from the viewer ViewRange All range of viewing distances to include ViewVector Automatic position and direction of a simulated camera ViewVertical {0,0,1} direction to make vertical

List of all options




Examples
open allclose allBasic Examples (3)Summary of the most common use cases
Scope (12)Survey of the scope of standard use cases
Graph Specification (6)
Specify a graph using a graph:

https://wolfram.com/xid/0rs6prk6g-6n4s8z

Specify a graph using a rule list:

https://wolfram.com/xid/0rs6prk6g-jiad

Specify a graph using a dense adjacency matrix:

https://wolfram.com/xid/0rs6prk6g-es74ar

Specify a graph using a sparse adjacency matrix:

https://wolfram.com/xid/0rs6prk6g-xxsr21

Use GraphData for collections of graphs:

https://wolfram.com/xid/0rs6prk6g-bym1l

Use ExampleData for collections of sparse matrices:

https://wolfram.com/xid/0rs6prk6g-9jq5p1

Graph Styling (6)

https://wolfram.com/xid/0rs6prk6g-dzwc2j


https://wolfram.com/xid/0rs6prk6g-lyhsxv


https://wolfram.com/xid/0rs6prk6g-rnd2yf

Plot a disconnected graph using different packing methods:

https://wolfram.com/xid/0rs6prk6g-fhg2mx

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

https://wolfram.com/xid/0rs6prk6g-vp04ih

Use EdgeShapeFunction and VertexShapeFunction for detailed control:

https://wolfram.com/xid/0rs6prk6g-payab

Options (71)Common values & functionality for each option
DataRange (1)
DirectedEdges (1)
GraphLayout (66)
"BalloonEmbedding" (6)
Place each vertex in an enclosing circle centered at its parent vertex:

https://wolfram.com/xid/0rs6prk6g-nbz2f7

"BalloonEmbedding" works best for tree graphs:

https://wolfram.com/xid/0rs6prk6g-8ufl0n

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

https://wolfram.com/xid/0rs6prk6g-kwbqgo

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

https://wolfram.com/xid/0rs6prk6g-uvg4ev

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

https://wolfram.com/xid/0rs6prk6g-1eeop6

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

https://wolfram.com/xid/0rs6prk6g-ojpa37

"BipartiteEmbedding" (1)
"CircularEmbedding" (2)
"CircularMultipartiteEmbedding" (2)
"DiscreteSpiralEmbedding" (3)
Place vertices on a discrete spiral:

https://wolfram.com/xid/0rs6prk6g-ociz1f

"DiscreteSpiralEmbedding" works best for path graphs:

https://wolfram.com/xid/0rs6prk6g-erfyib

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

https://wolfram.com/xid/0rs6prk6g-7zxrnm

"GridEmbedding" (2)
"HighDimensionalEmbedding" (2)
Place vertices in high dimension according to spring-electrical embedding and project down:

https://wolfram.com/xid/0rs6prk6g-xl28fv

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

https://wolfram.com/xid/0rs6prk6g-xa2mwc

https://wolfram.com/xid/0rs6prk6g-xlfz2e

"LayeredEmbedding" (6)
Place vertices in several layers in such a way as to minimize edges between nonadjacent layers:

https://wolfram.com/xid/0rs6prk6g-jz9m2n

"LayeredEmbedding" works best for tree graphs:

https://wolfram.com/xid/0rs6prk6g-s85lds

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

https://wolfram.com/xid/0rs6prk6g-c5i4rh

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

https://wolfram.com/xid/0rs6prk6g-1e4g1s

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

https://wolfram.com/xid/0rs6prk6g-v5dp5p

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

https://wolfram.com/xid/0rs6prk6g-uuxtyo

"LayeredDigraphEmbedding" (3)
Place vertices in a series of layers:

https://wolfram.com/xid/0rs6prk6g-nkj7be

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

https://wolfram.com/xid/0rs6prk6g-6f04i

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

https://wolfram.com/xid/0rs6prk6g-c76mto

"LinearEmbedding" (2)
"MultipartiteEmbedding" (2)
"PlanarEmbedding" (1)
"RadialEmbedding" (2)
"RandomEmbedding" (1)
"SpectralEmbedding" (2)
"SpiralEmbedding" (2)

https://wolfram.com/xid/0rs6prk6g-gavq9g

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

https://wolfram.com/xid/0rs6prk6g-otgemm

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

https://wolfram.com/xid/0rs6prk6g-66vox6

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

https://wolfram.com/xid/0rs6prk6g-pcwxis

https://wolfram.com/xid/0rs6prk6g-ycr55

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

https://wolfram.com/xid/0rs6prk6g-frmrff

https://wolfram.com/xid/0rs6prk6g-5gf4l0

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

https://wolfram.com/xid/0rs6prk6g-7y6k6p

https://wolfram.com/xid/0rs6prk6g-rsd5kl

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

https://wolfram.com/xid/0rs6prk6g-zt30w6

https://wolfram.com/xid/0rs6prk6g-ny81th

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

https://wolfram.com/xid/0rs6prk6g-bkryd8

https://wolfram.com/xid/0rs6prk6g-e3ocs3

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:

https://wolfram.com/xid/0rs6prk6g-2s8917

https://wolfram.com/xid/0rs6prk6g-4hsej8

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

https://wolfram.com/xid/0rs6prk6g-pienrf

https://wolfram.com/xid/0rs6prk6g-h1779y

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

https://wolfram.com/xid/0rs6prk6g-cne41e

https://wolfram.com/xid/0rs6prk6g-em0025

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

https://wolfram.com/xid/0rs6prk6g-lsbsuc

https://wolfram.com/xid/0rs6prk6g-zcbotu

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

https://wolfram.com/xid/0rs6prk6g-ov5k0g

https://wolfram.com/xid/0rs6prk6g-zftq5g

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

https://wolfram.com/xid/0rs6prk6g-rltxny

https://wolfram.com/xid/0rs6prk6g-yw9m8a

"SpringEmbedding" (10)
Place vertices so that they minimize mechanical energy when each edge corresponds to a spring:

https://wolfram.com/xid/0rs6prk6g-s5baes

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

https://wolfram.com/xid/0rs6prk6g-x4uvqp

https://wolfram.com/xid/0rs6prk6g-gs5vmp

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

https://wolfram.com/xid/0rs6prk6g-ih0fzt

https://wolfram.com/xid/0rs6prk6g-oza266

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

https://wolfram.com/xid/0rs6prk6g-pgxo89

https://wolfram.com/xid/0rs6prk6g-5k3wpc

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

https://wolfram.com/xid/0rs6prk6g-3ya7yg

https://wolfram.com/xid/0rs6prk6g-sms8wz

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

https://wolfram.com/xid/0rs6prk6g-zmy9dc

https://wolfram.com/xid/0rs6prk6g-wls559

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

https://wolfram.com/xid/0rs6prk6g-1dvu0n

https://wolfram.com/xid/0rs6prk6g-th0tg9

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

https://wolfram.com/xid/0rs6prk6g-desuuz

https://wolfram.com/xid/0rs6prk6g-b7tb38

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

https://wolfram.com/xid/0rs6prk6g-ub618a

https://wolfram.com/xid/0rs6prk6g-z2cb07

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

https://wolfram.com/xid/0rs6prk6g-gvtgsl

https://wolfram.com/xid/0rs6prk6g-pu79d1

"StarEmbedding" (3)
Place vertices on a star shape:

https://wolfram.com/xid/0rs6prk6g-je2zlx

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

https://wolfram.com/xid/0rs6prk6g-p7zdm2

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

https://wolfram.com/xid/0rs6prk6g-7suw46

PlotStyle (3)
Specify an overall style for the graph:

https://wolfram.com/xid/0rs6prk6g-iyhlr

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

https://wolfram.com/xid/0rs6prk6g-qwf78x

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

https://wolfram.com/xid/0rs6prk6g-d77bnc

Applications (2)Sample problems that can be solved with this function
Properties & Relations (7)Properties of the function, and connections to other functions
Use LayeredGraphPlot for hierarchical-style drawing of directed graphs:

https://wolfram.com/xid/0rs6prk6g-82938a

Use TreePlot for different types of tree drawing:

https://wolfram.com/xid/0rs6prk6g-j673mq

Use GraphPlot to draw graphs in 2D:

https://wolfram.com/xid/0rs6prk6g-fpwld

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

https://wolfram.com/xid/0rs6prk6g-fqfxu2

Get the connectivity and plot it:

https://wolfram.com/xid/0rs6prk6g-l9vdut


https://wolfram.com/xid/0rs6prk6g-bnocv

Use PolyhedronData for a large collection of polyhedra and properties:

https://wolfram.com/xid/0rs6prk6g-fj0n2c


https://wolfram.com/xid/0rs6prk6g-irjd4t

Compare to a predefined embedding:

https://wolfram.com/xid/0rs6prk6g-hiue1k

Use ExampleData for a large collection of sparse matrices:

https://wolfram.com/xid/0rs6prk6g-zf0av1

Use ArrayPlot or MatrixPlot to display sparse matrices:

https://wolfram.com/xid/0rs6prk6g-u08exi


https://wolfram.com/xid/0rs6prk6g-s0w9v2

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
]}
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
]}