PHYS 252

Making a movie with gnuplot

Here is a very simple way to make movies with gnuplot. We need three files, one containing the data ("out.dat"), and the other two are to be read in by gnuplot ("mainloop.gnu" and "oneframe.gnu"). Put all three in the same directory, and type 'load "mainloop.gnu" ' into gnuplot. Note that 'load [file]' enters the commands in the file as though you typed them in. The file mainloop.gnu calls oneframe.gnu. And then oneframe.gnu calls itself over and over again, making a plot each time.