How to plot all data files in the directory with gnuplot? I mean that from each data file a figure will be created. Data files have different names. I tried:
j=0;do for [i in system("ls")] { j=j+1; set term png; set output ''.i.'.png' ; p i u 1:2 w lines lc rgb "navy" t ''.i }
which lead to the error: x range is invalid
plot for [fn in system("ls")] fn with lines title ''.i
which lead to the error: internal error : STRING operator applied to undefined or non-STRING variable
This plot all data in one figure
a=system('a=`tempfile`;cat *.dat > $a;echo "$a"')
plot a u 1:2