# Plot graphs with direction and numbered in Mathematica

I would like to write a code in Mathematica such that it shows the direction with numbers on points. I wrote this code which does not do this. I want just to complete this code with two options I told. Any Idea. thanks.

ListPolarPlot[{Table[{2^n, 1}, {n, 1, 6}]}, Joined -> True,PlotStyle -> {Blue, Red, Green, Yellow, Gray}, Mesh -> All, MeshStyle -> Red]


-

data = Reverse@Table[{2^n, 1}, {n, 1, 6}];
Graph[Table[DirectedEdge[i, i + 1], {i, Length@data - 1}],
VertexLabels -> "Name", VertexCoordinates -> ({#2 Cos[#1], #2 Sin[#1]} & @@@ data),
Axes -> True, ImageSize -> 300]


-
foo := Module[{r = Transpose@Through[{Cos, Sin}[2^Range[#]]], p},
p = Partition[r, 2, 1];
Graphics[{Opacity[.5], Red, Disk[#, .05] & /@ r, Opacity[1],
Black, Text @@@ MapIndexed[{First@#2, #} &, r],
Arrow[#, .05] & /@ p},
PlotRange -> {{-1.2, 1.2}, {-1.2, 1.2}}]] &

foo@8


ListAnimate[Table[foo[i], {i, 2, 50}], AnimationDirection -> ForwardBackward]


Edit: post-processing ListPolarPlot output as in eldo's answer:

 n = 14;
Block[{i = 1, xx = {}},
Joined -> True, BaseStyle -> Arrowheads[.05],
PlotStyle -> (Hue /@ (Range[n]/n))] /.
Line[x_] :> {Disk[x[[1]], .07],
Text[Style[i++, 14, Black], x[[1]]], Arrow[xx = x, .05]} /.
Arrow[xx, .05] :> {GrayLevel[.7], Disk[xx[[2]], .07],
Text[Style[i++, 14, Black], xx[[2]]], Arrow[xx, .05]}]


-
+1 for fancyness :) – eldo Aug 12 '14 at 19:41
Thank you @eldo.. – kglr Aug 12 '14 at 19:50
PolarGraph[n_Integer] :=
Module[{lp = ListPolarPlot @ Table[{2^x, 1}, {x, 1, n}], p, a, t},
p = Reverse @ Take [Cases[lp, {_Real, _Real}, -1], n];
a = Arrow /@ Partition[p, 2, 1];
t = Text @@@ Transpose[{Range @ Length @ p, p}] /.
Text[u_, v_] :> Text[Style[u, Red, 16], v + 0.1];
Graphics[{a, t}, Axes -> True]]

PolarGraph[7]


-