# Animation in 2D graph

Hi I have a question on how can I create an animated 2 points (dot) that move across the n number of the data point, as shown in my 2D graph?

[![ListLinePlot${EncoderDeltaL, VoltageDeltaL}, PlotRange -> {-0.2, 2.5}, PlotLegends -> {"Mean Encoder", "Sensor"}, AxesLabel -> {"n", " $$CapitalDelta$L(cm)"}, PlotLabel -> "Mean 60$Degree$"$$][1]]

• It would be a good idea if you also post the lists you want to plot, such that we can see the plot. Also necessary to indicate (or at least to describe in details) which points should move and how? – Alexei Boulbitch Oct 8 '19 at 8:08

The simplest way is following:

series = Table[{x, Sin[x]^2}, {x, 0, 2 \[Pi], \[Pi]/18}];
an = Table[
ListLinePlot[series,
PlotMarkers -> Automatic, ImageSize -> 400,
Epilog -> {Red, PointSize[Large], Point[series[[i]]] }]
, {i, 1, Length@series}];

Export["d:\\tmp\\anum.gif", an, "DisplayDurations" -> 1/6]


• Thank you, let me give it a try! – Boajj04 Oct 8 '19 at 9:21