How to fill an area between two curves? - Gnuplot Programming

How to fill an area between two curves?



- A pseudo file ‘+’ is used to fill the area between two curves.

- The option ‘filledcurves’ closed is used.

- The following example demonstrates the process. The two curves are f(x) and g(x).
f(x)=cos(x)
g(x)=sin(x)
xmax=pi/4
set xrange [0:xmax]
plot '+' using 1:(f($1)):(g($1)) with filledcurves closed
Post your comment