3.9 Plotting many data files at once
The wildcards * and ? may be used in filenames supplied to the plot command to plot many data files at once. The following command, for example, plots all data files in the current directory with a .dat suffix, using the same plot options:
plot '*.dat' with linewidth 2
In the graph’s legend, full filenames are displayed, allowing the data files to be distinguished.
plot 'data.dat' using 1:2, '' using 2:3
This can even be used with wildcards, as in the following example:
plot '*.dat' using 1:2, '' using 2:3