next up previous contents index
Next: Time/Date data Up: Syntax Previous: Syntax   Contents   Index


Quote Marks

Gnuplot uses three forms of quote marks for delimiting text strings, double-quote (ascii 34), single-quote (ascii 39), and backquote (ascii 96).

Filenames may be entered with either single- or double-quotes. In this manual the command examples generally single-quote filenames and double-quote other string tokens for clarity.

String constants and text strings used for labels, titles, or other plot elements may be enclosed in either single quotes or double quotes. Further processing of the quoted text depends on the choice of quote marks.

Backslash processing of special characters like 3#3n (newline) and 3#3345 (octal character code) is performed for double-quoted strings. In single-quoted strings, backslashes are just ordinary characters. To get a single-quote (ascii 39) in a single-quoted string, it has to be doubled. Thus the strings "d3#3" s' b3#33#3" and 'd" s'' b3#3' are completely equivalent.

Text justification is the same for each line of a multi-line string. Thus the center-justified string

     "This is the first line of text.\nThis is the second line."

will produce
                      This is the first line of text.
                         This is the second line.

but
     'This is the first line of text.\nThis is the second line.'

will produce
         This is the first line of text.\nThis is the second line.

Enhanced text processing is performed for both double-quoted text and single-quoted text, but only by terminals supporting this mode. See enhanced text (p. [*]).

Back-quotes are used to enclose system commands for substitution into the command line. See substitution (p. [*]).


next up previous contents index
Next: Time/Date data Up: Syntax Previous: Syntax   Contents   Index
Ethan Merritt 2007-03-03