The format of the tic-mark labels can be set with the `set format` command.
Syntax:
set format {<axes>} {"<format-string>"}
set format {<axes>} {'<format-string>'}
show format
where <axes> is either `x`, `y`, `z`, `xy`, `x2`, `y2` or nothing (which is
the same as `xy`). The length of the string representing a tic mark (after
formatting with 'printf') is restricted to 100 characters. If the format
string is omitted, the format will be returned to the default "%g". For
LaTeX users, the format "$%g$" is often desirable. If the empty string "" is
used, no label will be plotted with each tic, though the tic mark will still
be plotted. To eliminate all tic marks, use `set noxtics` (Note:xtics ) or
`set noytics` (Note:ytics ).
Newline (\n) is accepted in the format string. Use double-quotes rather than
single-quotes to enable such interpretation. See also `syntax`
(Note:Syntax ).
The default format for both axes is "%g", but other formats such as "%.2f" or
"%3.0em" are often desirable. Anything accepted by 'printf' when given a
double precision number, and accepted by the terminal, will work. Some other
options have been added. If the format string looks like a floating point
format, then `gnuplot` (Note:gnuplot ) tries to construct a reasonable
format.
Characters not preceded by "%" are printed verbatim. Thus you can include
spaces and labels in your format string, such as "%g m", which will put " m"
after each number. If you want "%" itself, double it: "%g %%".
See also `set xtics` for more information about tic labels.