Gnuplot pm3d绘图“;inf";白色

Gnuplot pm3d绘图“;inf";白色,gnuplot,Gnuplot,我正在使用这些选项来绘制能量表面的3D地图 set cbrange [-60:60] set palette maxcolors 13 model RGB defined (0 "#0ab3f7",1 "#4dabec",2 "#6da2df", 3 "#8599d3", 4 "#9a8fc5",5 "#ac84b6", 6 "#bc79a7", 7 &

我正在使用这些选项来绘制能量表面的3D地图

set cbrange [-60:60]
 
set palette maxcolors 13 model RGB defined (0 "#0ab3f7",1 "#4dabec",2 "#6da2df", 3 "#8599d3", 4 "#9a8fc5",5 "#ac84b6", 6 "#bc79a7", 7 "#cc6c95", 8 "#da5d81",9 "#e74c69", 10 "#f3364a", 11 "#f4344
7", 12 "#ff0000") 

set cbtics ("-50" -50, "-40" -40, "-30" -30 , "-20" -20, "-10" -10, "0" 0, "10" 10, "20" 20, "30" 30, "40" 40, "50" 50, "inf" 60)
但是不能给inf值任何颜色。我该怎么做


如果您的数据实际包含Inf或-Inf,则应自动执行此操作。这是联机演示集合中的第一个绘图

#这是gnuplot演示集中“imageNaN.dem”的第一个绘图
#
设置标题“缺少/未定义/NaN/Inf数据的处理”
取消设置键
将tic刻度设置为0
在前面设置边框3
设置cbrange[-2:7]
设置“分数”标签
将cbtics设置为0,1,5
设置X范围[-0.5:4.5]
设置Y范围[-0.5:5.5]
设置数据文件丢失“?”
设置ytics(“-Inf”5、“Inf”4、“NaN”3、“Junk”2、?“1”、“0”0)
未设置xtics
#将测试数据定义为命名数据块

$matrixdata欢迎使用StackOverflow!你能展示几行示例数据吗?您是否有
inf
-inf
和/或
NaN
-NaN
。可以/不会打印这些值。那么,一个未标绘的数据点应该有哪种颜色?默认值为背景,因此明显为白色。您想要什么颜色?@theozh 0.000000 0.000000 inf 0.000000 0.012566 0.000000 inf 0.000000 0.025130 0.000000 inf 0.000000 0.000000 0.037699 0.000000 inf 0.000000 0.050265 0.000000 inf 0.000000 0.000000 0.062832 0.000000 inf 0.000000 0.000000 0.075398 0.000000 inf 0.0879650.000000 inf 0.000000 0.000000 0.100531 0.000000 inf 0.000000 0.113097 0.000000 inf 0.000000 0.000000请再说一遍,您想要什么颜色的
inf
# This is the first plot from "imageNaN.dem" in the gnuplot demo set
#
set title "Treatment of missing/undefined/NaN/Inf data"
unset key
set tic scale 0
set border 3 front

set cbrange [-2:7]
set cblabel "Score"
set cbtics 0,1,5

set xrange [-0.5:4.5]
set yrange [-0.5:5.5]

set datafile missing "?"
set ytics ("-Inf" 5, "Inf" 4, "NaN" 3, "Junk" 2, "?" 1, "0" 0)
unset xtics

# Define the test data as a named data block
$matrixdata << EOD
0    5 4 3  0
?    2 2 0  1
Junk 1 2 3  5
NaN  0 0 3  0
Inf  3 2 0  3
-Inf 0 1 2  3
EOD

set view map
plot $matrixdata matrix with image