Determining the best way to communicate technical ideas and research results can be nearly as challenging as doing the research itself. In the last 15-20 years the availability of computer projectors, presentation software, and digital video, has enabled a far greater arsenal of data visualization techniques than ever. However, there are still some limitations in the options most presenters choose.
On one hand, static charts and plots are very simple to produce, even with effective use of color, and lend themselves well to many formats. However, they can show a maximum of three dimensions (and the third dimension in a flat plot can be difficult to get right), and if there is a time history of the data it can be hard to intuitively understand a plot that shows time as a spatial dimension.
On the other hand, while videos can show a much greater wealth of data, using them in a presentation can be a crapshoot. I have seen more than my share of presentations where the author embedded a video, which ultimately showed up as nothing more than a black rectangle. Between ensuring that the correct codec and media player software exists on the presentation computer, ensuring that there is enough computing power to make the playback smooth, fussing around with what to click to get the thing to play on cue, and configuring it to play on a loop, embedding a video can be a royal pain. To boot, videos tend to make presentations very, very large on disk.
To address these shortcomings, I offer an intermediate option–one that has the simplicity of a static plot or image, but the ability to show motion and other change with time of a short video: animated GIFs. To be sure, GIFs cannot have sound associated, and they work best in short (<20 sec) clips. But they have the potential to give a wide array of presentations an additional tool to effectively express results. They show “video” in a constant loop and are compatible with all major presentation software, most image viewing software, and all major browsers (making it easy to transition from presentation to web page.)
There are several ways to create animated GIFs. Lifehacker published a very good guide on this process not long ago, but I wanted to throw another method into the mix, one that works especially well for stitching together images of plots (for example, from Matlab). This one uses the open source image manipulation software, ImageMagick. For this short tutorial, I will be using Linux-based commands, though I imagine that the Windows equivalents are very similar.
1. Generate the sequence of images.
For the example I use here, I used Matlab to run a simulation, then plotted the state of the system at each time stop and saved it to a *.bmp file (.png files will work just as well).
'%03u' means that the file name will have three digits no matter what number (i.e.
plot034.bmp). This is important to maintain as the converter program needs the correct format to parse the images in order.
2. Run ImageMagick
Run this command at the command line in the folder where the images from step 1 are stored.
convert -delay 20 -loop 0 plot*.bmp animation.gif
The -delay 20 argument will cause a 20 hundredths of a second delay between each frame (i.e. run the animation at 5 frames per second), and the -loop 0 will cause the GIF to loop over and over again.
Here is an example from some recent collision avoidance work I’ve been doing:
Remember, though–the more frames you put in, the larger the file.