I have been trying to change the fillstyle for the filledcurves option in gnuplot so that the fill colour represents the difference between the two curves on a 2-dimensional
If the pm3d 2D map is allowed without filledcurves, then the following code could be used to achieve this
In the data processing part, the grid data for splot
is constructed from the original input data. The color of the fill area is determined by the z-value given for splot.
set table $first
plot "test.dat" using 1:2:($3-$2) with table
set table $second
plot "test.dat" using 1:3:($3-$2) with table
unset table
set print $data
do for [i=1:|$first|] {
print $first[i]
print $second[i]
print ""
}
set print
set yrange [-2:2]
set palette define (-1 "skyblue", 0 "gray90", 1 "pink")
splot $data using 1:2:3 with pm3d