GraphCoordinates


calculates a visually appealing 2D layout of the vertices of the graph g and returns the coordinates of the vertices.

DetailsDetails

  • To use , you first need to load the Graph Utilities Package using Needs["GraphUtilities`"].
  • returns the coordinates of the vertices as computed using a graph-drawing algorithm. This is useful when you need to draw a graph repeatedly using the same layout but different styles.
  • accepts the same options as GraphPlot.

ExamplesExamplesopen allclose all

Basic Examples (1)Basic Examples (1)

In[1]:=
Click for copyable input

This plots a graph:

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

This gives the coordinates of the vertices in the previous drawing:

In[4]:=
Click for copyable input
Out[4]=

This plots the graph with two different styles, using the layout already calculated:

In[5]:=
Click for copyable input
Out[5]=

The relationship between vertices and coordinates is given by the following:

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