如何在gnuplot中绘制带有彩色边框的矩形 [英] How to draw a rectangle with a colored border in gnuplot

查看:411
本文介绍了如何在gnuplot中绘制带有彩色边框的矩形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在绘图中画一个空的矩形.

I would like to draw an empty rectangle in my plot.

到目前为止,我有:

set style rect back fs empty border lt 3 
set object 1 rect from 1,1 to 2,2 

我有一个带有虚线的矩形.如何更改线条的颜色? lc似乎在边界后不起作用.我也尝试设置新的线型和边框,但没有成功.

And I have my rectangle with a dashed line. How do I change the color of the line? lc does not seem to work after border. I also tried with setting a new line style, and border but I was not successful.

谢谢!

推荐答案

在您发布的代码中使用lc代替lt可以在4.6.5版中正常使用

Using lc instead of lt in the code you posted works fine with version 4.6.5:

reset
set style rect back fs empty border lc rgb '#008800'
set object 1 rect from 1,1 to 2,2 lw 5
set object 2 rect from 1,3 to 2,4 lw 5 fs empty border lc rgb '#880088'
plot x

在任何情况下(同时包含lt 3lc ...),矩形边框都是实心的.我尝试了wxtpngcairopdfcairopostscript端子,并每次都设置dashed选项.

In any case (both with lt 3 and lc ...) the rectangle borders are solid. I tried the wxt, pngcairo, pdfcairo and postscript terminals and set the dashed option every time.

这篇关于如何在gnuplot中绘制带有彩色边框的矩形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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