loops - How to plot several datafiles in consecutive graphs using gnuplot -


i have large number of ascii files named in order of form data.xxxx.tab, "xxxx" number between 0000 , 9999. each file contains 5 columns, first x-coordinate, second y-coordinate , remaining 3 variables wish plot against x-coordinate. need know how write loop in gnuplot 4.6, plot consecutive graphs of 1 of variables against x-coordinate.

i tried instructions given in following posts:

plotting gnuplot several files

and

gnuplot : plotting data multiple input files in single graph

but these created single graph containing curves data files together, whereas need consecutive graphs plotted 1 after another, showing evolution in time of variable graph.

the following should work:

# fix axes proper comparison between graphs set xrange [0:10] set yrange [0:10]  # if want animated gif set term gif animate set output 'output.gif'  # plot data [n=0:9999]{     plot sprintf("data.%04d.tab", n) using 1:2 title 'case '.n } 

the %04d string inside sprintf command prints number n until 4 zeros before minimum field width of n, i.e. n=2 printed 0002, , n=9999 printed 9999.


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

css - Can I use the :after pseudo-element on an input field? -