I have 100 files with data sets of identical (x,y) format and am trying to use a script to plot/replot all data to one single gnuplot plot. I have a gnuplot script that correctly opens and plots the first file, but the remaining 99 files are not replotted to the same graph, even though the files seem to be opened correctly. My main script looks like this:
# template.gnuplot
i = 1
j = 40000
n = 100
set terminal postscript enh color 24
load "loop.plt"
and loop.plt looks like this:
filename = "".j."_mod.int"
plotfile = "graph.eps"
print filename." ".plotfile
set output plotfile
if (i == 1) plot filename u 1:2 w lp; else replot filename u 1:2 w p
rep
set output
i=i+1
j=i*40000
if (i <= n) reread
Can anyone tell me if my if / else syntax is correct? What is the best way to append data to the first plot? Thanks for any suggestions!