I want to plot in the same graph a series of data contained in different directories with gnuplot.
I have a collection of folders called Ntimestep=X (whe
Gnuplot itself cannot create such file list, but you can call some command line tool or a second script which creates such a list, which can then be used by gnuplot.
So something like
list = system('ls Ntimestep=*/occ.dat')
plot for [file in list] file
On Windows something like list = system('dir /b *.txt') should work, see Script Gnuplot on windows OS (I cannot test it).
To get the number in the title, using only gnuplot you can use
t(s) = (s2 = s[11:*], s2[0:strlen(s2)-8])
plot for [file in list] file title t(file)
To be more flexible regarding the string format you'll again need to use an external tool (e.g. pipe the output of ls through sed).