plots
graphplot3d
plot an undirected graph in 3-D
Calling Sequence
Parameters
Description
Examples
graphplot3d(G, eigenopts, opts)
G
-
real symmetric Matrix
eigenopts
(optional) specifies vertex numbers
opts
equations of form option=value
Important: The plots[graphplot3d] command has been deprecated. Use the superseding command GraphTheory[DrawGraph] instead.
This routine draws an undirected graph G=V,E in three dimensions in such a way that structure and symmetry in the graph is revealed. The graph G is input as an adjacency matrix, that is, a real symmetric matrix. The output is a three-dimensional plot of labeled points and lines connecting them. The points correspond to the vertices in the graph and the lines correspond to the edges in the graph, that is, there will be a line connecting point i with point j when Gi,j is nonzero.
The location of the vertices of the graph is determined as follows. Let u, v, and w be three eigenvectors of G with corresponding second, third, and fourth largest eigenvalue in absolute value. Then the (x,y,z) co-ordinates of the ith vertex of G is (ui,vi,wi).
Sometimes other symmetries in the graph may be seen by using the other eigenvectors. If the optional argument eigenvectors=e1,e2,e3 is specified, where e1, e2, e3 are vertex numbers (integers from 1 through the number of vertices) then the eigenvectors corresponding to the eigenvalues of these relative magnitudes are used.
Remaining arguments are interpreted as options which are specified as equations of the form option = value. The remaining options are the same as those available for the plot3d command. See plot3d[option] for further information.
with⁡plots:
cube≔Matrix⁡8,8,shape=symmetric:
cube1,2≔1:cube2,3≔1:cube3,4≔1:cube1,4≔1:
cube5,6≔1:cube6,7≔1:cube7,8≔1:cube5,8≔1:
cube1,5≔1:cube2,6≔1:cube3,7≔1:cube4,8≔1:
graphplot3d⁡cube
cp≔factor⁡LinearAlgebra:-CharacteristicPolynomial⁡cube,x
cp≔x−3⁢x+3⁢x−13⁢x+13
graphplot3d⁡cube,eigenvectors=1,3,8
with⁡networks:
G≔dodecahedron⁡:
A≔adjacency⁡G
graphplot3d⁡A,title=A dodecahedron
See Also
GraphTheory[DrawGraph]
networks
networks[draw3d]
plot3d[option]
Download Help Document