# How to change the vertex layout

(Using V9 on Ubuntu)

Consider the following code, to create a graph.

f[x_] := Mod[x^11, 100];
NV = 22;
V = Table[i, {i, 1, NV}]
FV = Table[f[V[[i]]], {i, 1, NV}]
EV = Table[DirectedEdge[V[[i]], FV[[i]]], {i, 1, NV}]


The output is nice. From the Help we get a way to change the vertex layout: So I defined a function for circular layout and tried again:

circle[n_] := Table[{Cos[2 Pi/n u], Sin[2 Pi/n u]}, {u, 1, n}]
Graph[EV, VertexCoordinates -> circle[NV]]


but the output was only a list of points: What am I missing?

vn = VertexCount[Graph[EV]] • Do you know why is necessary to compute the vertex again? vn is not equal to NV! – Sigur Dec 22 '14 at 15:25
• @Sigur, a graph with EdgeList EV has nv (36) vertices, not NV (22); and the setting for the VertexCoordinates option should be a list of length 36 (a coordinate for each vertex). (BTW, you might want to change "vertex shape" in your post to "vertex layout" or to "vertex coordinates".) – kglr Dec 22 '14 at 15:52