This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

VertexList

VertexList[g]
gives a list of all vertices in the graph g.
  • returns a list of vertices of the graph g.
  • For graphs specified using a rule list, the list of vertices are returned in the order in which they first appear.
The list of vertices of a simple graph:
The list of vertices of a graph specified by an adjacency matrix consists of consecutive integers:
Needs["GraphUtilities`"]
The list of vertices of a simple graph:
In[2]:=
Click for copyable input
Out[2]=
The list of vertices of a graph specified by an adjacency matrix consists of consecutive integers:
In[3]:=
Click for copyable input
Out[3]=
This defines a simple web graph, and calculates the GraphCoordinates:
This shows the relationship between the vertex list and the coordinates:
This draw the web graph using the coordinate information:
Ordering given by may not be the same as the lexicographical ordering of vertex labels: