如何在键中放置一个与Gnuplot中的阴影区域具有相同色调的矩形? [英] How to put a rectangle in the key with same hue as a shaded area in Gnuplot?

查看:95
本文介绍了如何在键中放置一个与Gnuplot中的阴影区域具有相同色调的矩形?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在绘图中有一些阴影区域,我想用与绘图中阴影相同色相的小矩形标记该阴影区域.

I have some shaded area in a plot and I'd like to label that shaded area with a small rectangle of the same hue as the shading in the plot.

我正在使用gnuplot-我在图中的阴影是通过

I'm using gnuplot - my shading in the plot is achieved with

plot  'XXXX.dat' u 1:($2+$3):($2-$3) w filledcurve ls 999 fs solid 0.2 notitle,\

我想用相同色调的小矩形标记键的阴影区域.

and I'd like to label the shading area in the key with a small rectangle of the same hue.

有可能吗?我也很乐意通过

Is it possible? I'm also happy to set it manually via

set object rectangle from x1,y1 to x2,y2 fc rgb "blue"

但是以这种方式,我仅设法从标准gnu绘图调色板中采样颜色,而不是通过 fs solid 0.2 为阴影设置的色调.

but in this way I've only managed to sample colours from the standard gnu plot palette and not the hue I've set for the shading via fs solid 0.2.

谢谢!

推荐答案

我不确定是否理解您的问题.如果要在键中填充区域,则必须通过 title 定义一个键盘输入,但是您使用的是 notitle .

I'm not sure if I understand your problem. If you want the filled area in your key you have to define a keyentry via title but you are using notitle.

代码:

set key out
plot '+' u 1:($1**2) w filledcurves ls 999 fs solid 0.2 title "filled area"

结果:

这篇关于如何在键中放置一个与Gnuplot中的阴影区域具有相同色调的矩形?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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