GraphEmbedding

GraphEmbedding[g]
gives coordinates of the vertices of the graph g.

GraphEmbedding[g, "emb"]
gives coordinates of the vertices of the graph g using the embedding .

GraphEmbedding[g, "emb", dim]
gives coordinates in dimension dim of the vertices of the graph g using the embedding .

DetailsDetails

  • The settings for the embedding are the same as in GraphLayout.

ExamplesExamplesopen allclose all

Basic Examples (2)Basic Examples (2)

Get the coordinates of the vertices of a graph:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Obtain coordinates in two dimensions and three dimensions for spring embedding:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=
New in 9
New to Mathematica? Find your learning path »
Have a question? Ask support »