# Plot region in between two discrete functions

I am trying to plot the region in between two curves that I only have as discrete data, without plotting the curves corresponding to the data.

In principle, I could interpolate the functions and then do a RegionPlot with the interpolated functions, but this seems complicated. The following simple code snippet gets very close to doing the job, so I was wondering if there a simple modification that would get me there.

ListLinePlot[Transpose[Table[{Sin[x], Cos[x]}, {x, 0, 5, .1}]],
Filling -> {1 -> {2}}, PlotStyle -> Thickness[0]]


Result:

• Either option would work. Or make them disappear entirely – Daniel Jun 26 at 11:34

One simple way this can be achieved is by the following options:

PlotStyle -> None, FillingStyle -> LightBlue


The first option turns off the lines, the second allows one to specify the filling colour.

Result:

Try this:

RegionPlot[
Or[y <= Cos[x] && y >= Sin[x] && Cos[x] >= Sin[x],
y >= Cos[x] && y <= Sin[x] && Cos[x] <= Sin[x]], {x, 0, 5}, {y, -1,
1}, AspectRatio -> 2/5]


yielding

Have fun!

• Thank you! I was going for a way that doesn't highlight the curves (in your version they are a deeper shade of blue), as in my own answer. Furthermore, as I said, the function exists only as discrete data. – Daniel Jul 27 at 6:53
• Its absolute OK when you give preference to any of the answers. However, I would like to inform you that the "highlighting" of the curves or "shade" of any color is only the question of options that you use, not of the method. Further, if you want to get a good answer to your question, put exact, unequivocal questions. – Alexei Boulbitch Jul 29 at 8:58