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 =

animationtable =
Transpose[{rawdata[[All, 1]][[10000 ;; 130000]],
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}];

animationtable, “DisplayDurations” -> 0.15]

Six channels of nerve signals

A similar example for animating cyclic voltammetric data:

hydrogen adsorption/desorption

BZ 3D Attractor Pictures

These were made using a combination of python and gnuplot. Initially it was all python, but I found that gnuplot was much faster and more stable than MayaVi in this case. Not sure if that’s always true.

rainbow-colored attractor from Mathematica plot


darker colors

How these were plotted:

The data points were generated from the BZ-simulation equation shown in my paper. I have tried plotting these huge data sets in MayaVi, Mathematica, and gnuplot. There was no detailed quantitative comparison as to which was the best, and each has its own advantages.

Since the simulation (data crunching) was done in python, MayaVi had the advantage of being fully integrated into the python code. However, it tended to be very slow with the large sets of data.

Mathematica made some very nice-looking plots, but was also pretty slow with large sets and also I was unable to figure out how to remove the 3D frame around the image.

The overall winner in was gnuplot, which excels primarily in 2D plots but has some basic 3D capabilities. Most importantly, it’s probably ten times as fast as the others for very large data sets. Typical gnuplot commands for these plots were as follows:

$ gnuplot

gnuplot> unset border; unset tics

gnuplot> set key off

gnuplot> unset colorbox

gnuplot> set view

gnuplot> set size 1.2,1.2

gnuplot> set palette rgbformulae 30,31,5

gnuplot> splot ‘mydata.tsv’ using 1:2:3 with points palette pointsize 0.01 pointtype 7

mydata.tsv is just a text file with x,y,z data separated with spaces


SJSU Thesis Template in LaTeX

This is an un-official work in progress. Believed to meet all the guidelines. Nevertheless, there is obviously no warranty or guarantee that there aren’t any potential formatting issues.

Here are the main files:

the complete project (zip file)

the custom BibTeX style file

a readme about the project

8/29/2012 Update: .ps image format

This version must use .ps or .eps formatted images. This is the way to go because it allows the use of built-in graphics with pstricks code. The result is a relatively small file size for the finished product

the complete .ps image version: project (zip file)