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 "emb".

GraphEmbedding[g,"emb",dim]

gives coordinates in dimension dim of the vertices of the graph g using the embedding "emb".

Details

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

Examples

open allclose all

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]=

Scope  (23)

Applications  (3)

Properties & Relations  (2)

See Also

VertexCoordinates  GraphLayout

Introduced in 2012
(9.0)