I am trying to plot four 2d plots in a 3d box. I want these plots to be filled with respect to zero. That is, if the line is above zero, I want it to be filled from the line until zero. If the line dips below zero, I want it to be filled below zero, until the line. I cannot even manage to fill the plots correctly, there seems to be a bug, as discussed in a previous post here.
This is the data and code:
\begin{tikzpicture}
\pgfplotstableread{
plot1 plot2 plot3 plot4
0.0045 0.0029 0.0089 0.0001
0.0040 0.0028 0.0083 0.0009
0.0035 0.0027 0.0073 0.0014
0.0029 0.0025 0.0062 0.0016
0.0024 0.0023 0.0050 0.0016
0.0019 0.0020 0.0038 0.0013
0.0014 0.0017 0.0027 0.0010
0.0010 0.0015 0.0018 0.0006
0.0007 0.0012 0.0010 0.0001
0.0004 0.0009 0.0005 -0.0004
0.0002 0.0007 0.0001 -0.0008
0.0001 0.0005 -0.0000 -0.0012
0.0000 0.0004 -0.0000 -0.0015
0.0000 0.0003 0.0001 -0.0018
0.0000 0.0002 0.0002 -0.0019
0.0001 0.0001 0.0005 -0.0021
0.0001 0.0001 0.0007 -0.0021
0.0002 0.0001 0.0009 -0.0021
0.0002 0.0000 0.0012 -0.0021
0.0002 0.0000 0.0013 -0.0021
0.0003 0.0000 0.0015 -0.0020
0.0003 0.0001 0.0016 -0.0020
0.0003 0.0001 0.0017 -0.0019
0.0003 0.0001 0.0017 -0.0018
0.0003 0.0001 0.0017 -0.0018
0.0003 0.0001 0.0017 -0.0017
0.0003 0.0001 0.0017 -0.0016
0.0003 0.0001 0.0017 -0.0016
0.0003 0.0001 0.0016 -0.0015
0.0003 0.0001 0.0016 -0.0015
0.0003 0.0001 0.0016 -0.0014
0.0003 0.0001 0.0016 -0.0014
0.0003 0.0001 0.0016 -0.0013
0.0003 0.0002 0.0015 -0.0013
0.0003 0.0002 0.0015 -0.0013
0.0003 0.0002 0.0015 -0.0012
0.0003 0.0002 0.0015 -0.0012
0.0003 0.0002 0.0015 -0.0011
0.0003 0.0002 0.0015 -0.0011
0.0003 0.0002 0.0014 -0.0010
}\dummydata
\begin{axis}[
ytick={1,2,3,4},
yticklabels={$\tilde{\widehat{y_t}}$, $\tilde{\widehat{c_t}}$, $\tilde{\widehat{i_t}}$, $\tilde{\widehat{z_t}}$},
xtick={5, 15, 25, 35},
zmin=-0.002,
area plot/.style={
fill opacity=0.75,
draw=orange!80!black,thick,
fill=orange,
mark=none,
}
]
\pgfplotsinvokeforeach{4,3,...,1}{
\addplot3 [area plot] table [x expr=\coordindex, y expr=#1, z=plot#1]
{\dummydata} \closedcycle;
}
\end{axis}
\end{tikzpicture}


\closedcycleis currently useless for 3d axes and (b) there is a unique meaning for it (at least for line plots in 3d), I decided to add support for such applications to pgfplots. As of pgfplots 1.13 (not released at the time of this writing), your example will work without any changes (as does the linked question). – Christian Feuersänger Dec 31 '15 at 17:10pgfplotsmanual? – Christian Feuersänger Dec 31 '15 at 17:11