盒装标签的背景色 [英] Boxed label with background color

查看:75
本文介绍了盒装标签的背景色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何绘制具有特定background颜色的boxed label? (例如图例框)

Howto plot a boxed label with a specific background color? (Like the legend box)

推荐答案

您的意思是:

LABEL="label in a box"
set obj 10 rect at 0,0 size char strlen(LABEL), char 1 fc rgb "cyan"
set label 10 LABEL at 0,0 front center
plot sin(x)

这是链接,指向gnuplot的演示,我从中得到了想法.

Here's a link to gnuplot's demo where I got the idea.

当然,您可以将盒子的尺寸稍大一些-我发现它使外观看起来更好:

Of course, you can make the size of the box slightly bigger -- I find that it makes things look a little nicer:

set obj 10 rect at 0,0 size char strlen(LABEL)+1, char 1.5 fc rgb "cyan"

但这取决于您.

这篇关于盒装标签的背景色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆