gnuplot script file

do for [a=1000:2000] {
set term x11 0
pl ‘./GenEigfun_107.txt’ u 1:2:3 every :::a::a w p pt 7 ps 2 palette t sprintf(“%.3f”,a)
set term x11 1
set arrow from a, graph 0 to a, graph 1 nohead
pl ‘./GenEigen_107.txt’ u 3 w p t sprintf(“%.3f”,a)
unset arrow
pause 0.5
}

opens two windows, plots the eigenfucntions (1000-2000) as you move through the eigenvalues

plot (and watch) a data movie in gnuplot

Imagine you have  a data file with some parameter changing. And a 2d plot corresponding to each value of this parameter.

Now say, you save a data file data.txt, with multiple blocks(each block should be separated from each other by a single line). And each block corresponds to a unique value of that parameter.

Now you want to see live, how the two d plot changes with this parameter slowly changing. (this parameter could very well be time)

The do for loop in gnuplot is very powerful..

say ‘a’ was that parameter

the every command chooses block by block

pause command waits for 0.5 seconds (can be tuned)

save the following commands in a file and run it using gnuplot.

In order to make  a movie one can save each of these files and then make movie using other software

———————–

do for [a=1:100] {
pl ‘./data.txt’ u 1:2:3 every :::a::a w p pt 7 palette
pause 0.5
}

—————————