I'm trying to plot two graphs with the area between them filled. This works fine, except for the fact that the \closedcycle does not go down vertically, but rather at some (arbitrary?) slope, circled in red:
Here is my MWE:
\documentclass{article}
\usepackage{pgfplots,pgfplotstable}
\begin{document}
\begin{tikzpicture}
\pgfplotstableread[col sep=semicolon] {data.csv}\data
\begin{axis}[
xmin=0.2]
\addplot[gray,smooth,fill=black!10!white]
table[x=xvalues,y=upper]{\data} \closedcycle;
\addplot[gray,smooth,fill=white]
table[x=xvalues,y=lower]{\data} \closedcycle;
\end{axis}
\end{tikzpicture}
\end{document}
My data.csv looks like this:
xvalues;lower;upper
0.15;949.59;1069.76
0.21;1290.74;1457.88
0.27;1617.32;1822.28
0.33;1928.45;2167.26
0.39;2237.91;2486.17
0.45;2526.9;2776.77
0.51;2750.88;3032.38
0.57;2875.84;3249.56
0.63;2935.11;3326.71
0.69;2854.73;3237.55
0.75;2595.52;3087.41
0.81;2256.67;2756.42
0.87;1681.25;2169.95
0.93;1636.97;1974.47
0.99;1464.91;1773.17
1.05;1307.58;1590.35
1.11;1188.51;1454.49
1.17;1078.54;1317.64
1.23;981.88;1216.65
1.29;902.7;1120.32
1.35;834.92;1015.32
1.41;763.63;924.14
1.47;694.77;843.91
Edit: My workaround for the moment is making up imaginary values at 1.6, and setting xmax=1.5, so the slope is outside the plotting area. This can't be the correct way to do it though, so I'm still interested. Or is my approach for filling wrong in general?
