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
The trick is to draw the lines, then fill between them with filledcurves
. Here's how to do it (based on the examples at gnuplot):
set style line 2 lc rgb 'forest-green'
set style line 3 lc rgb 'plum'
set style fill pattern 5 lc 'yellow'
set xrange [0:3000]
set yrange [0:1]
plot 'data.txt' u 1:2:3 w filledcurves notitle, \
'' u 1:2 ls 2 with lines notitle, \
'' u 1:3 ls 3 with lines notitle
The output looks like this:
The data file contains these dummy values (that resemble your second graph):
500 0.90 0.90
1000 0.90 0.75
1500 0.92 0.40
2000 0.95 0.30
2500 0.94 0.23