This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

GraphPlot3D

GraphPlot3D
generates a 3D plot of the graph in which vertex is connected to vertex .
GraphPlot3D
associates labels with edges in the graph.
GraphPlot3D[m]
generates a plot of the graph represented by the adjacency matrix m.
  • GraphPlot3D attempts to place vertices in 3D to give a well laid-out version of the graph.
DataRangeAutomaticthe range of vertex coordinates to generate
EdgeRenderingFunctionAutomaticfunction to give explicit graphics for edges
MethodAutomaticthe method used to lay out the graph
MultiedgeStyleAutomatichow to draw multiple edges between vertices
PackingMethodAutomaticmethod to use for packing components
PlotStyleAutomaticoverall graphics directives for vertices and edges
SelfLoopStyleAutomatichow to draw edges linking a vertex to itself
VertexCoordinateRulesAutomaticrules for explicit vertex coordinates
VertexLabelingAutomaticwhether to show vertex names as labels
VertexRenderingFunctionAutomaticfunction to give explicit graphics for vertices
  • With the default setting VertexLabeling->Automatic, vertices are displayed as points, with their names given in tooltips, so long as the number of vertices is not too large.
  • Tooltip can be used to specify an alternative tooltip for a vertex.
  • With VertexRenderingFunction->f, each vertex is rendered with the 3D graphics primitives given by , where is the position where the vertex is being placed, and is its name.
  • With EdgeRenderingFunction->g, each edge is rendered with the 3D graphics primitives given by , where , are the beginning and ending points of the edge, , are the beginning and ending vertices, and is any label specified for the edge.
  • With the default setting DataRange->Automatic, coordinates are chosen so that the average length of the edges in the graph is approximately .
  • In VertexCoordinateRules, an explicit rule specifies coordinates for a vertex. If any coordinate is given as Automatic, it is found automatically. Vertices for which no rules are specified are taken to have automatically generated x, y, and z positions.
  • The graph does not need to be connected. Disconnected components are typically arranged so as to fill a planar area roughly uniformly.
  • When a graph is specified by an adjacency matrix, the names of its vertices are taken to be successive integers starting at 1.
  • With the default setting MultiedgeStyle->Automatic, multiple edges are not shown if the graph is specified by an adjacency matrix.
  • Possible settings for Method include , , , , , and .
Draw a graph in 3D:
Display vertex labels:
Draw a graph specified by its adjacency matrix:
Use rendering and style options to tailor the presentation:
Draw a graph in 3D:
In[1]:=
Click for copyable input
Out[1]=
 
Display vertex labels:
In[1]:=
Click for copyable input
Out[1]=
 
Draw a graph specified by its adjacency matrix:
In[1]:=
Click for copyable input
Out[1]=
 
Use rendering and style options to tailor the presentation:
In[1]:=
Click for copyable input
Out[1]=
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:
Give vertex labels:
Do not show multiedges or self-loops:
Plot a disconnected graph:
For very large graphs, it is often better not to draw vertices at all:
Use EdgeRenderingFunction and VertexRenderingFunction for detailed control:
Use different methods to get different layouts:
Plot graphs generated by Combinatorica:
Draw vertices only:
Draws edges using gray lines, and self-loops using red lines:
Give labels for some edges:
Draw edges as cylinders and vertices as spheres:
Apply a number of methods on the Petersen graph:
Spread multiple edges by a specified scaled distance:
Pack disconnected components using different methods:
Use different PlotRangePadding around the graph:
Specify an overall style for the graph:
PlotStyle can be combined with VertexRenderingFunction, which has higher priority:
PlotStyle can be combined with EdgeRenderingFunction, which has higher priority:
Draw self-loops with a specified scaled diameter:
Explicitly specify all vertex coordinates:
Explicitly specify only coordinates, and automatically compute the coordinate:
Show vertex labels:
Show vertex labels as tooltips only:
Show vertex labels both explicitly and as tooltips:
Show no vertices:
Draw edges as cylinders and vertices as spheres:
Make a 3D graph layout with spheres and cylinders:
Structure an engineering matrix:
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:
GraphPlot3D supports graphs defined by Combinatorica:
New in 6