using some saved data, i use (The data file cane be download from pX.txt where the first column is the x and at each iteration, I plot the other columns with respect to the first column)
\documentclass{article}
\usepackage{pgfplots,pgfplotstable}
\pgfplotstableread{pX.txt}\datatablePX%
\begin{document}
\begin{tikzpicture}
\begin{axis}[
zmin=10^5,
area plot/.style={
fill opacity=0.75,
draw=black!50!black,
fill=blue!50,
mark=none,
},
xlabel={$x[m]$},ylabel={Time},zlabel={p[bar]}
]
\pgfplotsinvokeforeach{120,119,...,1}{
\addplot3 [area plot] table [x index=0, y expr=#1, z index=#1] {\datatablePX};
}
\end{axis}
\end{tikzpicture}
\end{document}
to plot some data in 3d, where I want the area under the curves to be filled. However, the wrong area is being filled as one can notice in the following plot.

It is filling the area to a line plot between the start and the end values. Why doesn't it simply fill with respect to the x-axis?

\documentclass{...}, the required\usepackage's,\begin{document}, and\end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – Henri Menke Mar 02 '14 at 18:50pX.txt. – Henri Menke Mar 02 '14 at 20:02[`pX.txt`](https://gist.github.com/anonymous/9035028). My approach would be to try to cycle the path manually be usingrel axis cs. – Henri Menke Mar 02 '14 at 20:14