# 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.

If a blank filename is supplied to the `plot` command, the last used data file is used again, as in the example:

    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

- 3.9.1 Horizontally arranged data files
- 3.9.2 Choosing which data to plot