manpagez: man pages & more
info gnuplot
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.25.23 format

The format of the tic-mark labels can be set with the ‘set format‘ command or with the ‘set tics format‘ or individual ‘set {axis}tics format‘ commands.

Syntax:

      set format {<axes>} {"<format-string>"}
      set format {<axes>} {'<format-string>'}
      show format

where <axes> is either ‘x‘, ‘y‘, ‘xy‘, ‘x2‘, ‘y2‘, ‘z‘, ‘cb‘ or nothing (which applies the format to all axes). The following two commands are equivalent:

      set format y "%.2f"
      set ytics format "%.2f"

The length of the string is restricted to 100 characters. The default format is "% g", but other formats such as "%.2f" or "%3.0em" are often desirable. The format "$%g$" is often desirable for LaTeX. If no format string is given, the format will be returned to the default. If the empty string "" is given, tics will have no labels, although the tic mark will still be plotted. To eliminate the tic marks, use ‘unset xtics‘ or ‘set tics scale 0‘.

Newline (\n) and enhanced text markup is accepted in the format string. Use double-quotes rather than single-quotes in this case. See also ‘syntax‘. 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, and decimalsign for how to use non-default decimal separators in numbers printed this way. See also electron demo (electron.dem).


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on February 28, 2014 using texi2html 5.0.

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.