GraphCoordinates

As of Version 10, all the functionality of the GraphUtilities package is built into the Wolfram System. >>

GraphCoordinates[g,options]
calculates a visually appealing 2D layout of the vertices of the graph g and returns the coordinates of the vertices.

更多信息更多信息

  • GraphCoordinates functionality is now available in the built-in Wolfram Language function GraphEmbedding.
  • To use GraphCoordinates, you first need to load the Graph Utilities Package using Needs["GraphUtilities`"].
  • GraphCoordinates 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.
  • GraphCoordinates accepts the same options as GraphPlot.

范例范例打开所有单元关闭所有单元

基本范例  (2)基本范例  (2)

In[1]:=
Click for copyable input

This plots a graph:

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

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

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

GraphCoordinates has been superseded by GraphEmbedding:

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