gnuplot图例legend设置

//将图例放在右下角

set key bottom

//将图例放在中间

set key center

//将图例放在左边

set key left

//将图例放在指定位置右下角的坐标为(10,0.7)

set key bottom at 10,0.7

//不显示图例。

unset key

//设置图例 显示在图形(内)的顶部居中,并且多个图例水平显示。

set key top horizontal center

//设置文字在图例后面,通常是图例放在左上方的时候使用

set key left reverse Left spacing 1.2

//设置图例 显示在图形(外)的顶部居中,并且多个图例水平显示。

set key top outside horizontal center

//设置图例 显示的字体并加粗。

set key font "Times,18,Bold"

//调整图例行间隔

set key spacing 3

//调整图例中线段示例长度

set key samplen 2

set key 的语法规则

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}
             {{no}box { {linestyle | ls <line_style>}
                        | {linetype | lt <line_type>}
                          {linewidth | lw <line_width>}}}
     unset key
     show key
原文地址:https://www.cnblogs.com/zhoubiyu/p/8405522.html