14.10.2014 Views

gnuplot documentation

gnuplot documentation

gnuplot documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

77 TERMINAL <strong>gnuplot</strong> 4.3 187<br />

’abc&{def}ghi’<br />

would produce<br />

’abc<br />

ghi’.<br />

The ’˜ ’ character causes the next character or bracketed text to be overprinted by the following character<br />

or bracketed text. The second text will be horizontally centered on the first. Thus ’˜ a/’ will result in<br />

an ’a’ with a slash through it. You can also shift the second text vertically by preceding the second text<br />

with a number, which will define the fraction of the current fontsize by which the text will be raised or<br />

lowered. In this case the number and text must be enclosed in brackets because more than one character<br />

is necessary. If the overprinted text begins with a number, put a space between the vertical offset and<br />

the text (’˜ {abc}{.5 000}’); otherwise no space is needed (’˜ {abc}{.5 — }’). You can change the font<br />

for one or both strings (’˜ a{.5 /*.2 o}’ — an ’a’ with a one-fifth-size ’o’ on top — and the space between<br />

the number and the slash is necessary), but you can’t change it after the beginning of the string. Neither<br />

can you use any other special syntax within either string. You can, of course, use control characters by<br />

escaping them (see below), such as ’˜ a{\^}’<br />

You can access special symbols numerically by specifying \character-code (in octal), e.g., {/Symbol<br />

\245} is the symbol for infinity.<br />

You can escape control characters using \, e.g., \\, \{, and so on.<br />

But be aware that strings in double-quotes are parsed differently than those enclosed in single-quotes.<br />

The major difference is that backslashes may need to be doubled when in double-quoted strings.<br />

Examples (these are hard to describe in words — try them!):<br />

set xlabel ’Time (10^6 {/Symbol m}s)’<br />

set title ’{/Symbol=18 \362@_{/=9.6 0}^{/=12 x}} \<br />

{/Helvetica e^{-{/Symbol m}^2/2} d}{/Symbol m}’<br />

The file "ps guide.ps" in the /docs/psdoc subdirectory of the <strong>gnuplot</strong> source distribution contains more<br />

examples of the enhanced syntax.<br />

77.53.2 Editing postscript<br />

The PostScript language is a very complex language — far too complex to describe in any detail in<br />

this document. Nevertheless there are some things in a PostScript file written by <strong>gnuplot</strong> that can be<br />

changed without risk of introducing fatal errors into the file.<br />

For example, the PostScript statement "/Color true def" (written into the file in response to the command<br />

set terminal postscript color), may be altered in an obvious way to generate a black-and-white version<br />

of a plot. Similarly line colors, text colors, line weights and symbol sizes can also be altered in straightforward<br />

ways. Text (titles and labels) can be edited to correct misspellings or to change fonts. Anything<br />

can be repositioned, and of course anything can be added or deleted, but modifications such as these<br />

may require deeper knowledge of the PostScript language.<br />

The organization of a PostScript file written by <strong>gnuplot</strong> is discussed in the text file "ps file.doc" in the<br />

docs/ps subdirectory of the <strong>gnuplot</strong> source distribution.<br />

77.53.3 Postscript fontfile<br />

The fontfile or fontfile add option takes one file name as argument and encapsulates this file into the<br />

postscript output in order to make this font available for text elements (labels, tic marks, titles, etc.).<br />

The fontfile delete option also takes one file name as argument. It deletes this file name from the list<br />

of encapsulated files.<br />

The postscript terminal understands some font file formats: Type 1 fonts in ASCII file format (extension<br />

".pfa"), Type 1 fonts in binary file format (extension ".pfb"), and TrueType fonts (extension ".ttf").<br />

Pfa files are understood directly, pfb and ttf files are converted on the fly if appropriate conversion tools<br />

are installed (see below). You have to specify the full filename including the extension. Each fontfile<br />

option takes exact one font file name. This option can be used multiple times in order to include more<br />

than one font file.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!