Spectral Graph Layout Method - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Spectral Graph Layout Method

 

Options

Description

Examples

Options

• 

largest=truefalse

  

By default, the spectral method uses the eigenvectors corresponding to the smallest eigenvalues.  If this option is true then the eigenvectors corresponding to the largest eigenvalues are used.

• 

logdegree=truefalse

  

If this option is true then instead of using the Laplacian of the graph, a modified version of the Laplacian is used with the log of the degree of each vertex on the diagonal instead of the degree. This can help prevent clustering near the origin in graphs with a lot of variation in the degrees of vertices.

• 

normalized=truefalse

  

By default the normalized form of the LaplacianMatrix is used when logdegree=false and the unnormalized form otherwise. This option can force use of the other form.

Description

• 

The spectral layout method is so named because it uses the eigenvectors of the normalized LaplacianMatrix of the Graph to choose the positions of the points.

• 

For a given graph, this layout is unique, unless the LaplacianMatrix has a smallest (or largest if largest=true) eigenvalue of multiplicity greater than one. In that case, the eigenvector basis of the associated eigenspace may differ between sessions, leading to very different graph layouts. This is uncommon for random graphs, but extremely common for highly structured graphs.

• 

This layout method works in two and three dimensions.

Examples

withGraphTheory:

withSpecialGraphs:

withRandomGraphs:

GGraphundirected,1,2,1,4,2,3,3,4

GGraph 1: an undirected graph with 4 vertices and 4 edge(s)

(1)

DrawGraphG,layout=spectral

DrawGraphG,layout=spectral,layoutoptions=largest=true

DrawGraphG,layout=spectral,layoutoptions=largest=true,normalized=false

HHypercubeGraph3

HGraph 2: an undirected graph with 8 vertices and 12 edge(s)

(2)

DrawGraphH,layout=spectral,dimension=3

KRandomGraph50,125

KGraph 3: an undirected graph with 50 vertices and 125 edge(s)

(3)

DrawGraphK,layout=spectral,dimension=3,layoutoptions=logdegree=true

See Also

GraphTheory[DrawGraph]