### Key samples

By default, each plot on the graph generates a corresponding entry in the key. This entry contains a plot title and a sample line/point/box of the same color and fill properties as used in the plot itself. The font and textcolor properties control the appearance of the individual plot titles that appear in the key. Setting the textcolor to "variable" causes the text for each key entry to be the same color as the line or fill color for that plot. This was the default in some earlier versions of gnuplot.

The length of the sample line can be controlled by samplen. The sample length is computed as the sum of the tic length and sample_length times the character width. samplen also affects the positions of point samples in the key since these are drawn at the midpoint of the sample line, even if the sample line itself is not drawn.

Key entry lines are single-spaced based on the current font size. This can be adjusted by set key spacing line-spacing.

The width_increment is a number of character widths to be added to or subtracted from the length of the string. This is useful only when you are putting a box around the key and you are using control characters in the text. gnuplot simply counts the number of characters in the string when computing the box width; this allows you to correct it.