=== Basic usuage {{{ gnuplot> plot [1.0:3.0] sin(2*x) gnuplot> plot "data.file" using 1:3, "data.file" using 1:2 }}} === How to save output to //png// file Change //png// to //gif// when writing the command if you want to save it to //gif// file {{{ gnuplot> set terminal png gnuplot> set output 'myfile.png' gnuplot> plot './fort.8' }}} === How to create animated gif by a bunch of data. **Requirement**: [[http://www.lcdf.org/~eddietwo/gifsicle/|gifsicle]] Suppose we have a bunch of data files named //myfiletitle-//n//.dat//, where //n// is an integer determine the sequence of these data files. the following script will create gif files using these data files {{{ #! /bin/bash while [ $# -gt 0 ] do f=`echo $1 | sed "s/.dat//g"`; title=`echo $f | sed "s/[0-9]//g"`; echo "set terminal gif" > gnuplotfile echo "set output '"$f".gif'" >>gnuplotfile # x y range in your preference echo "set xrange [-1.0:3.0]" >>gnuplotfile echo "set yrange [-0.3:0.8]" >>gnuplotfile #change the title if you want echo "set title '"$title"'">>gnuplotfile echo "plot './"$1"'">>gnuplotfile #use gnuplot to create gif file `gnuplot < gnuplotfile` shift done #suppose you don't have any other gif file in the current folder #or change *.gif to suit your situation `gifsicle --delay=10 *.gif >anim.gif` }}} Save the above code to a file, say //script//, then run the command {{{ ./script myfiletitle-*.dat }}} === References [[http://people.duke.edu/~hpgavin/gnuplot.html|gnuplot]]