【发布时间】:2021-10-14 07:20:13
【问题描述】:
我的方法基于http://gnuplot.sourceforge.net/demo/pm3dcolors.html
为此,能够正确显示任意数量的颜色并与图对齐非常重要。
在上图中,您可以看到颜色之间奇怪的重叠,并且有不同的宽度,并且与图表不完全一致。
这篇文章的其余部分展示了让它看起来怪异的最低要求。
我发现在 33 种颜色之后它开始搞砸了。
#!/usr/bin/env gnuplot
set format cb "%3.1f"
set style function pm3d
set view map scale 1
unset xtics
unset ytics
unset ztics
unset colorbox
unset key
set title "33 colours"
set palette model RGB
set palette file "-"
1 0 0
0 1 0
0 0 1
... repeat many times ...
1 0 0
0 1 0
0 0 1
e
set palette maxcolors 33
g(x)=x
splot g(x)
pause mouse any "press the any key to exit gnuplot
总的来说,这显然是对 gnuplot 的滥用。
还有其他更好的方法吗? 如果没有,我应该如何调试?
我正在从 debian Bullseye 上的 debian repos 运行 gnuplot 5.4 patchlevel 1。
感谢您的任何建议。
编辑:
我陷入了 XY 问题的陷阱。 我希望问题中的第一个图表没有奇怪的东西,比如当它们都应该是相同的宽度时,你如何能看到不同的颜色宽度。 我询问了我发现的用设置调色板显示我所看到的奇怪事物的最小方式。
我当前的输入数据如下所示:
Hue, Red, Green, Blue
0.0100, 255, 15, 0
0.0300, 255, 46, 0
0.0400, 255, 61, 0
0.0600, 255, 92, 0
0.0700, 255, 107, 0
...
我生成该情节的脚本是http://ix.io/3BE2
【问题讨论】:
标签: gnuplot