Q:

Adding arrows in curves

Let's consider the following case
f[x_] := x^2;
data = Table[{x, f[x]}, {x, -10, 10, 0.1}];
p0 = ListPlot[data, Frame -> True, Axes -> False, Joined -> True, 
     PlotStyle -> {Blue, Thick}]

In reality my data sets correspond to closed curves (loops), for which however the analytic equation is unknown. So, the solution should not take for granted that we know the exact mathematical expression.
Now I would like to add arrows inside the curve (which is produced by joining the points) thus showing the direction (from left to right), like this

Any suggestions?

A:

ClearAll[f, x, data];
f[x_] := x^2;
data = Table[{x, f[x]}, {x, -10, 10, 0.1}];
p0 = ListPlot[data, Frame -> True, Axes -> False, Joined -> True, 
   PlotStyle -> {Blue, Thick}];

p0 /. Line[x_] :> {Arrowheads[Table[.05, {5}]], Arrow[x]}

p0 /. Line[x_] :> {Arrowheads[{0, .05, .05, 0}], Arrow[x]}

or
Show[p0, BaseStyle -> Arrowheads[{0, .05, .05, 0}]] /. Line -> Arrow
(* same picture *)

You can also set the Arrowheads directive as part of the PlotStyle option:
ListPlot[data, Joined -> True, Frame -> True, Axes -> False, 
  PlotStyle -> {Blue, Thick, Arrowheads[{0, .05, .05, 0}]}] /.  Line -> Arrow

or, as the setting for BaseStyle
ListPlot[data, Joined -> True, Frame -> True, Axes -> False, 
  BaseStyle -> Arrowheads[{0, .05, .05, 0}], PlotStyle -> {Blue, Thick}] /. Line -> Arrow

