Skip to content

Embedding

Ed Scheinerman edited this page Sep 19, 2018 · 30 revisions

Embedding

An embedding of a graph is an assignment of points in the plane to the vertices of the graph. To visualize a graph in its current embedding, see the DrawSimpleGraphs module or one of the Exporting functions.

A graph's embedding is part of the graph's data structure. See the Cache page of this Wiki.

Creating an Embedding

  • embed(G) gives G the circular embedding.
  • embed(G,method) gives G an embedding using one of the following methods:
    • :circular: vertices arranged in a circle.
    • :random: vertices placed at random locations.
    • :spring: model edges as springs and vertices are repelling bodies.
    • :spectral: coordinates based on eigenvectors for the 2nd and 3rd smallest eigenvalues.
    • :stress: attempt to place vertices so their geometric distance matches their graph-theoretic distance.
    • :combined: First do a :spring and then do a :stress embedding. Often gives attractive results.

Clone this wiki locally