A number of shell environment variables are understood by gnuplot. None of these are required, but may be useful.

GNUTERM, if defined, is used to set the terminal type on start-up. Starting with version 5.2 the entire string in GNUTERM is passed to "set term" so that terminal options may be included. E.g.

GNUTERM="postscript eps color size 5in, 3in"
This can be overridden by the ~ /.gnuplot (or equivalent) start-up file (see startup) and of course by later explicit set term commands.

GNUHELP may be defined to be the pathname of the HELP file (gnuplot.gih).

On VMS, the logical name GNUPLOT$HELP should be defined as the name of the help library for gnuplot. The gnuplot help can be put inside any VMS system help library.

On Unix, HOME is used as the name of a directory to search for a .gnuplot file if none is found in the current directory. On MS-DOS, Windows and OS/2, GNUPLOT is used. On Windows, the NT-specific variable USERPROFILE is also tried. VMS, SYS$LOGIN: is used. Type help startup.

On Unix, PAGER is used as an output filter for help messages.

On Unix, SHELL is used for the shell command. On MS-DOS and OS/2, COMSPEC is used for the shell command.

FIT_SCRIPT may be used to specify a gnuplot command to be executed when a fit is interrupted — see fit. FIT_LOG specifies the default filename of the logfile maintained by fit.

GNUPLOT_LIB may be used to define additional search directories for data and command files. The variable may contain a single directory name, or a list of directories separated by a platform-specific path separator, eg. ':' on Unix, or ';' on DOS/Windows/OS/2 platforms. The contents of GNUPLOT_LIB are appended to the loadpath variable, but not saved with the save and save set commands.

Several gnuplot terminal drivers access TrueType fonts via the gd library. For these drivers the font search path is controlled by the environmental variable GDFONTPATH. Furthermore, a default font for these drivers may be set via the environmental variable GNUPLOT_DEFAULT_GDFONT.

The postscript terminal uses its own font search path. It is controlled by the environmental variable GNUPLOT_FONTPATH. The format is the same as for GNUPLOT_LIB. The contents of GNUPLOT_FONTPATH are appended to the fontpath variable, but not saved with the save and save set commands.

GNUPLOT_PS_DIR is used by the postscript driver to search for external prologue files. Depending on the build process, gnuplot contains either a built-in copy of those files or a default hardcoded path. You can use this variable have the postscript terminal use custom prologue files rather than the default files. See postscript prologue.

Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley
Distributed under the gnuplot license (rights to distribute modified versions are withheld).