Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Gnuplot默认行颜色rgb值_Gnuplot - Fatal编程技术网

Gnuplot默认行颜色rgb值

Gnuplot默认行颜色rgb值,gnuplot,Gnuplot,我使用的是gnuplot 5.2,希望获得与默认线条颜色关联的rgb值。使用命令test我得到了可用选项和参数的一个很好的摘要,但是默认颜色只是用1、2、3、….标记,并且没有显示rgb值。命令show colors也很有用,但它只显示颜色名称和rgb值,而不显示标签1、2、3、,所以我不知道哪个是哪个 我的目标是使用默认的线颜色和具有透明度的打印线。从这里的其他问题中,我了解到这在5.2版中是可能的,通过颜色指定操作lc rgb#aarggbb,但为此,我需要知道rgb值 gnuplot似乎没

我使用的是gnuplot 5.2,希望获得与默认线条颜色关联的rgb值。使用命令
test
我得到了可用选项和参数的一个很好的摘要,但是默认颜色只是用
1、2、3、….
标记,并且没有显示rgb值。命令
show colors
也很有用,但它只显示颜色名称和rgb值,而不显示标签
1、2、3、
,所以我不知道哪个是哪个

我的目标是使用默认的线颜色和具有透明度的打印线。从这里的其他问题中,我了解到这在5.2版中是可能的,通过颜色指定操作
lc rgb#aarggbb
,但为此,我需要知道rgb值


gnuplot似乎没有包含默认行颜色的简单文本配置文件(我在fedora上),
rpm-ql gnuplot
没有显示任何这样的配置文件,所以我有点迷路了。

在gnuplot 5.2中,通过
测试调色板
将rgb颜色值从当前调色板获取到数据块
$调色板
。检查帮助调色板

因此,如果你这样做:

test palette
print $PALETTE
你会得到

0.0000 0.0000 0.0000 0.0000 0.0000 
0.0039 0.0626 0.0000 0.0246 0.0215 
0.0078 0.0886 0.0000 0.0493 0.0321 
0.0118 0.1085 0.0000 0.0739 0.0409 
0.0157 0.1252 0.0000 0.0984 0.0487 
0.0196 0.1400 0.0000 0.1229 0.0559 
...
0.4941 0.7029 0.1206 0.0370 0.2852 
0.4980 0.7057 0.1235 0.0123 0.2849 
0.5020 0.7085 0.1265 0.0000 0.2861 
0.5059 0.7113 0.1295 0.0000 0.2887 
0.5098 0.7140 0.1325 0.0000 0.2913 
0.5137 0.7167 0.1356 0.0000 0.2939 
0.5176 0.7195 0.1387 0.0000 0.2965 
...
0.9725 0.9862 0.9199 0.0000 0.8348 
0.9765 0.9882 0.9311 0.0000 0.8420 
0.9804 0.9901 0.9423 0.0000 0.8492 
0.9843 0.9921 0.9537 0.0000 0.8565 
0.9882 0.9941 0.9651 0.0000 0.8638 
0.9922 0.9961 0.9767 0.0000 0.8711 
0.9961 0.9980 0.9883 0.0000 0.8785 
1.0000 1.0000 1.0000 0.0000 0.8860 
那就取决于你到底想用它做什么

添加:

好的,您所说的是键入
test
时显示的颜色,对吗? 这就是我用wxt终端得到的

gnuplot子文件夹
share
中有一个名为
colors\u default.gp
的文件

# Ethan A Merritt - my preference for gnuplot colors
# 2 3 4 5 6 8 are borrowed from the colors_podo set
#
set linetype  1 lc rgb "dark-violet" lw 1
set linetype  2 lc rgb "#009e73" lw 1
set linetype  3 lc rgb "#56b4e9" lw 1
set linetype  4 lc rgb "#e69f00" lw 1
set linetype  5 lc rgb "#f0e442" lw 1
set linetype  6 lc rgb "#0072b2" lw 1
set linetype  7 lc rgb "#e51e10" lw 1
set linetype  8 lc rgb "black"   lw 1
set linetype  9 lc rgb "gray50"  lw 1
set linetype cycle  9
其中:

dark-violet = #9400d3
black       = #000000

但是,显然,颜色(在测试屏幕中)是以8的周期重复的。

在gnuplot 5.2中,您通过
测试调色板
将rgb颜色值从当前调色板获取到数据块
$调色板
。检查帮助调色板

因此,如果你这样做:

test palette
print $PALETTE
你会得到

0.0000 0.0000 0.0000 0.0000 0.0000 
0.0039 0.0626 0.0000 0.0246 0.0215 
0.0078 0.0886 0.0000 0.0493 0.0321 
0.0118 0.1085 0.0000 0.0739 0.0409 
0.0157 0.1252 0.0000 0.0984 0.0487 
0.0196 0.1400 0.0000 0.1229 0.0559 
...
0.4941 0.7029 0.1206 0.0370 0.2852 
0.4980 0.7057 0.1235 0.0123 0.2849 
0.5020 0.7085 0.1265 0.0000 0.2861 
0.5059 0.7113 0.1295 0.0000 0.2887 
0.5098 0.7140 0.1325 0.0000 0.2913 
0.5137 0.7167 0.1356 0.0000 0.2939 
0.5176 0.7195 0.1387 0.0000 0.2965 
...
0.9725 0.9862 0.9199 0.0000 0.8348 
0.9765 0.9882 0.9311 0.0000 0.8420 
0.9804 0.9901 0.9423 0.0000 0.8492 
0.9843 0.9921 0.9537 0.0000 0.8565 
0.9882 0.9941 0.9651 0.0000 0.8638 
0.9922 0.9961 0.9767 0.0000 0.8711 
0.9961 0.9980 0.9883 0.0000 0.8785 
1.0000 1.0000 1.0000 0.0000 0.8860 
那就取决于你到底想用它做什么

添加:

好的,您所说的是键入
test
时显示的颜色,对吗? 这就是我用wxt终端得到的

gnuplot子文件夹
share
中有一个名为
colors\u default.gp
的文件

# Ethan A Merritt - my preference for gnuplot colors
# 2 3 4 5 6 8 are borrowed from the colors_podo set
#
set linetype  1 lc rgb "dark-violet" lw 1
set linetype  2 lc rgb "#009e73" lw 1
set linetype  3 lc rgb "#56b4e9" lw 1
set linetype  4 lc rgb "#e69f00" lw 1
set linetype  5 lc rgb "#f0e442" lw 1
set linetype  6 lc rgb "#0072b2" lw 1
set linetype  7 lc rgb "#e51e10" lw 1
set linetype  8 lc rgb "black"   lw 1
set linetype  9 lc rgb "gray50"  lw 1
set linetype cycle  9
其中:

dark-violet = #9400d3
black       = #000000
但是,显然,颜色(在测试屏幕中)以8的周期重复。

简单回答:

gnuplot> show linetype

        linetype 1,  linecolor rgb "dark-violet"  linewidth 1.000 dashtype solid pointtype 1 pointsize default
        linetype 2,  linecolor rgb "#009e73"  linewidth 1.000 dashtype solid pointtype 2 pointsize default
        linetype 3,  linecolor rgb "#56b4e9"  linewidth 1.000 dashtype solid pointtype 3 pointsize default
        linetype 4,  linecolor rgb "#e69f00"  linewidth 1.000 dashtype solid pointtype 4 pointsize default
        linetype 5,  linecolor rgb "#f0e442"  linewidth 1.000 dashtype solid pointtype 5 pointsize default
        linetype 6,  linecolor rgb "#0072b2"  linewidth 1.000 dashtype solid pointtype 6 pointsize default
        linetype 7,  linecolor rgb "#e51e10"  linewidth 1.000 dashtype solid pointtype 7 pointsize default
        linetype 8,  linecolor rgb "black"  linewidth 1.000 dashtype solid pointtype 8 pointsize default
        Linetypes repeat every 8 unless explicitly defined
简单回答:

gnuplot> show linetype

        linetype 1,  linecolor rgb "dark-violet"  linewidth 1.000 dashtype solid pointtype 1 pointsize default
        linetype 2,  linecolor rgb "#009e73"  linewidth 1.000 dashtype solid pointtype 2 pointsize default
        linetype 3,  linecolor rgb "#56b4e9"  linewidth 1.000 dashtype solid pointtype 3 pointsize default
        linetype 4,  linecolor rgb "#e69f00"  linewidth 1.000 dashtype solid pointtype 4 pointsize default
        linetype 5,  linecolor rgb "#f0e442"  linewidth 1.000 dashtype solid pointtype 5 pointsize default
        linetype 6,  linecolor rgb "#0072b2"  linewidth 1.000 dashtype solid pointtype 6 pointsize default
        linetype 7,  linecolor rgb "#e51e10"  linewidth 1.000 dashtype solid pointtype 7 pointsize default
        linetype 8,  linecolor rgb "black"  linewidth 1.000 dashtype solid pointtype 8 pointsize default
        Linetypes repeat every 8 unless explicitly defined

我想我们谈论的是两件不同的事情。有调色板和线条的默认颜色。你需要哪一个?我不确定从何处获取默认线颜色的rgb值,但通过linestyle(和索引编号),您可以定义任何想要的颜色。检查
帮助linestyle
。我想我们谈论的是两件不同的事情。有调色板和线条的默认颜色。你需要哪一个?我不确定从何处获取默认线颜色的rgb值,但通过linestyle(和索引编号),您可以定义任何想要的颜色。选中帮助行样式。