GNUPLOT is very powerful set of programs for making graphs. Here, we see how can we use it for making animation and saving it in gif format.

rm -f gnuplot.rot
###Making input file for the gnuplot
for ((z=0; z<=360; z=z+5)) #for varying the longitude
cat >> gnuplot.rot <<!
set view xview(xrot), zview(zrot), 2, 1
set size square
set view xview(xrot), zview(zrot), 2, 1
set size square
splot cos(u)*cos(v),cos(u)*sin(v),sin(u) notitle with lines lt 5, \
      'world10.dat' notitle with lines lt 3 lw 1     

echo "Now Plotting"

set term gif transparent nocrop enhanced animate delay 20 loop 0 nooptimize #setting the terminal size 600,600 background rgb 'white' font "verdana,12"
set output "globe.gif" #setting the output name
unset title #notitle
unset key #no key
unset xtics #no x axis ticks
unset ytics #no y axis ticks
set border 0 #no border
set hidden3d nooffset #hidden line removal for surface plotting
set parametric
set angles degrees
set samples 128,128 #no of points
set isosamples 13,13
set mapping spherical
set dummy u,v
set urange [ -90.0000 : 90.0000 ] noreverse nowriteback
set vrange [ 0.00000 : 360.000 ] noreverse nowriteback
set style data line
load "gnuplot.rot"


Data File: world10.dat