pgfplots: fill the volume under a 3d surface

I have a very simple 3d graph.

\begin{tikzpicture}

\begin{axis}[view={60}{20},
%axis equal image=true,
xlabel=$X(T)$, ylabel={$D(T)$}, zlabel={$V(T)$},
zmin=0
]
samples=30,domain=0:100,y domain=0:100]
{x+y};
\end{axis}
\end{tikzpicture}


This code draws a surface. What I would like to see is the volume under the surface to be colored. Moreover I would like to label in some way the filled volume as "defaulted". I went through all the pages of the manual but could not find any solution. Does someone know how to do it?

Thank you very much.

-
Welcome to TeX.sx! – lockstep Nov 19 '12 at 11:42
Could you explain what do you really mean when you say filled volume. May be an image or something. I want to see the output you are looking for. – Manuel Nov 19 '12 at 15:43
I am looking for this kind of output: \addplot3[...] {x+y}; img109.imageshack.us/img109/752/filled.jpg – Marco Nov 19 '12 at 17:10
You will need to provide something like \fill[red] (axis cs:0,0,0) -- (axis cs:100,0,100); manually after your surf plot (or add feature requests for such a plot type - which might be a "waterfall plot"?). – Christian Feuersänger Nov 21 '12 at 7:42

Unfortunately I only read Christian Feuersänger's comment after putting together exactly what he recommends; so here's what you could do, but you'll need to manually specify points at the edge, which will be quite complicated for curved surfaces:

Code

\documentclass[tikz,border=2mm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.8}

\begin{document}

\begin{tikzpicture}
\begin{axis}[view={60}{20},
%axis equal image=true,
xlabel=$X(T)$, ylabel={$D(T)$}, zlabel={$V(T)$},
zmin=0
]
\fill[opacity=0.5,red] (axis cs: 0,0,0) -- (axis cs: 100,0,100) -- (axis cs: 100,0,0) -- cycle;
\fill[opacity=0.5,yellow] (axis cs: 0,0,0) -- (axis cs: 0,100,100) -- (axis cs: 0,100,0) -- cycle;
\fill[opacity=0.5,green] (axis cs: 100,0,100) -- (axis cs: 100,100,200) -- (axis cs: 100,100,0) -- (axis cs: 100,0,0) -- cycle;
\fill[opacity=0.5,blue] (axis cs: 0,100,100) -- (axis cs: 100,100,200) -- (axis cs: 100,100,0) -- (axis cs: 0,100,0) -- cycle;
\end{axis}
\end{tikzpicture}

\end{document}


Output

Edit 1: You can also fake the color gradient (in this simple example):

Code

\documentclass[tikz,border=2mm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.8}

\begin{document}

\begin{tikzpicture}
\begin{axis}
[   view={60}{20},
xlabel=$X(T)$,
ylabel={$D(T)$},
zlabel={$V(T)$},
zmin=0,
]
\fill[opacity=1,left color=blue, right color=yellow] (axis cs: 0,0,0) -- (axis cs: 100,0,100) -- (axis cs: 100,0,0) -- cycle;
\fill[opacity=1,bottom color=yellow, top color=red] (axis cs: 100,0,100) -- (axis cs: 100,100,200) -- (axis cs: 100,100,0) -- (axis cs: 100,0,0) -- cycle;

I suspect the red area has to be filled after the yellow one. – g.kov Jun 3 '13 at 21:41
Probably with opacity=1. But here (opacity=0.5) it really does not matter ;) – Tom Bombadil Jun 3 '13 at 22:19