I am currently working on a project where I need to plot a set of functions and fill the area between them.
I have tried different things, but I cannot really get it to work.
Here is a simplified version of the gnuplot script:
f(x) = 80
g(x) = 0.35*x - 7.5
h(x) = -1.96629*x + 710
i(x) = -80
j(x) = -0.35*x + 7.5
k(x) = 1.96629*x -710
set xzeroaxis
set xtics axis
set xrange [0:500]
set yzeroaxis
set ytics axis
set yrange [-200:200]
set border 0
plot f(x) with lines ls 1 lt rgb "red", \
g(x) with lines ls 1 lt rgb "red", \
h(x) with lines ls 1 lt rgb "red", \
i(x) with lines ls 1 lt rgb "blue", \
j(x) with lines ls 1 lt rgb "blue", \
k(x) with lines ls 1 lt rgb "blue"
This produces the following plot:
I have tried different things and this link got me some of the way, but I am running out of ideas.
So my question goes: is it possible to fill the area between the red and blue lines (I.e the convex space that the functions form)?