Wasu M.
Wasu M.

Reputation: 119

Gnuplot wouldn't reset (GIF)

It is supposed to reset and make an animation. I have tried all the suggestions from other previous posts, but I still have this result. enter image description here

my datei.dat has 4 columns with an empty line seperating each block.

set autoscale
set datafile seperator ","
plot "datei.dat" index (i) u 1:2 t '1:2' with linespoints ,\
   "datei.dat" index (i) u 1:3 t '1:3' with linespoints ,\
   "datei.dat" index (i) u 1:4 t '1:4' with linespoints 
replot
pause 1
i = i + 1
if(i<N) reread

animate.plt

reset
set term gif animate
set terminal gif animate delay 50
set output "plotalive.gif"
N = int(STATS_blocks)
i = 0
load "animate.plt"
set output

loop.plt

Upvotes: 0

Views: 190

Answers (1)

bibi
bibi

Reputation: 3765

If n is the size of blocks you should use the every. Index is used to separate datasets (two blank lines).

Here is a what might be done avoiding the reread (some change might be done):

set terminal dummy
plot "datei.dat"
N = int(STATS_blocks)

set terminal gif animate delay 50
set output "plotalive.gif"

set autoscale
set datafile seperator ","

do for [i=0:N] {
plot "datei.dat" u 1:2 every ::i::i t '1:2' with linespoints ,\
   "" u 1:3 every ::i::i t '1:3' with linespoints ,\
   "" u 1:4 every ::i::i t '1:4' with linespoints 
}
set output

Upvotes: 1

Related Questions