gnuplot图例legend设置

本文介绍了gnuplot中设置图例(key)的各种方法,包括将其放置在不同位置,如右下角、中间、左边,以及自定义位置。此外,还涵盖了图例的显示风格,如文字、字体大小、行间距、示例线段长度等,帮助用户更好地定制图形的视觉效果。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

//将图例放在右下角

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值