The `set key` command enables a key (or legend) describing plots on a plot.
The contents of the key, i.e., the names given to each plotted data set and function and samples of the lines and/or symbols used to represent them, are determined by the title and with options of the {`s`}`plot` command. Please see title and with for more information.
Syntax:
set key {on|off} {default}
{{inside | outside} | {lmargin | rmargin | tmargin | bmargin}
| {at <position>}}
{left | right | center} {top | bottom | center}
{vertical | horizontal} {Left | Right}
{{no}reverse} {{no}invert}
{samplen <sample_length>} {spacing <vertical_spacing>}
{width <width_increment>}
{height <height_increment>}
{{no}autotitle {columnheader}}
{title "<text>"} {{no}enhanced}
{font "<face>,<size>"} {textcolor <colorspec>}
{{no}box { {linestyle | ls <line_style>}
| {linetype | lt <line_type>}
{linewidth | lw <line_width>}}}
unset key
show key
The key contains a title and a sample (line, point, box) for each plot in the graph. The key may be turned off by requesting `set key off` or `unset key`. Individual key entries may be turned off by using the `notitle` keyword in the corresponding plot command.
Elements within the key are stacked according to `vertical` or `horizontal`. In the case of `vertical`, the key occupies as few columns as possible. That is, elements are aligned in a column until running out of vertical space at which point a new column is started. In the case of `horizontal`, the key occupies as few rows as possible.
Bted with Acrobherit } pre.format { font-family:inherit } pre.smalldisplay { font-family:inherit; font-size:smaller } pre.smallformat { font-family:inherit; font-size:smaller } pre.smallexample { font-size:smaller } pre.smalllisp { font-size:smaller } span.sc { font-variant:small-caps } span.roman { font-family:serif; font-weight:normal; } span.sansserif { font-family:sans-serif; font-weight:normal; } -->
When `gnuplot` is run, it looks for an initialization file to load. This file is called `.gnuplot` on Unix and AmigaOS systems, and `GNUPLOT.INI` on other systems. If this file is not found in the current directory, the program will look for it in the HOME directory (under AmigaOS, MS-DOS, Windows and OS/2, the environment variable `GNUPLOT` should contain the name of this directory; on Windows NT, it will use `USERPROFILE` if GNUPLOT isn't defined). Note: if NOCWDRC is defined during the installation, `gnuplot` will not read from the current directory.
If the initialization file is found, `gnuplot` executes the commands in it. These may be any legal `gnuplot` commands, but typically they are limited to setting the terminal and defining frequently-used functions or variables.