5.23.14 grid

set [no]grid <axis> ...

The grid setting controls whether a grid is placed behind a plot or not. Issuing the command:

set grid

would cause a grid to be drawn with its gridlines connecting to the ticks of the default axes (usually the first $x$- and $y$-axes). Conversely, issuing:

unset grid

would remove from the plot all gridlines associated with the ticks of any axes. One or more axes can be specified for the set grid command; a grid will then be drawn to connect with the ticks of these axes. An example of this syntax would be:

set grid x1 y3

which would cause gridlines to be drawn from ticks of the first $x$- and third $y$-axes.

It is possible, though not always aesthetically very pleasing, to draw gridlines from multiple parallel axes, for example:

set grid x1x2x3