Animating data in Mathematica

In Mathematica, large sets of data can easily be animated using a few lines of code. One approach is shown below:

rawdata =
Import[“/Documents/nervesignals/nervesignals.atf”,
“Data”];

animationtable =
Table[ListLinePlot[
ParallelTable[
Transpose[{rawdata[[All, 1]][[10000 ;; 130000]],
Standardize[
rawdata[[All, i]][[10000 ;; 130000]]] + (22 i)}], {i, 2,
7}], Frame -> True, Axes -> False, AxesLabel -> False,
FrameTicks -> None,
PlotRange -> {{(j – 2.5), (j + 2.5)}, {20, 165}},
ImageSize -> 750, PlotStyle -> Thick], {j, 3.5, 9.5, 0.08}];

Export[“/animation/myanimation.gif”,
animationtable, “DisplayDurations” -> 0.15]

Six channels of nerve signals

A similar example for animating cyclic voltammetric data:

hydrogen adsorption/desorption

Leave a Reply