I'm trying to create a gif with the dynamic title that is taking column header for each frame.
The code:
set terminal gif animate delay 20
set output 'gse.gif'
set cbrange [0:0.00025]
set xrange [-0.3:0.3]
set yrange [-0.3:0.3]
set ylabel "z (m)"
set xlabel "x (m)"
set cblabel "grain size"
set rmargin at screen 0.8
do for [i=0:10] {
plot 'gse.dat' index i with image title columnheader(1)
}
with the dataset:
"Time: 0 years"
-0.2475 -0.546333 1e-05
-0.2425 -0.546333 1e-05
-0.2375 -0.546333 1e-05
-0.2325 -0.546333 1e-05
-0.2275 -0.546333 1e-05
-0.2225 -0.546333 1e-05
-0.2175 -0.546333 1e-05
-0.2125 -0.546333 1e-05
...
"Time: 162 years"
-0.247513 -0.546305 1e-05
-0.242512 -0.546305 1e-05
-0.237512 -0.546305 1e-05
...
"Time: 1674 years"
-0.247631 -0.546045 1e-05
-0.242628 -0.546045 1e-05
-0.237625 -0.546045 1e-05
...
produces:
My hope is that it will set the title like this:
but with the value for each frame that is taken from the first column header.
P.S. I would also consider changing dataset format if that will be more convenient.


