I want to draw a section of a sphere to represent its volume.
I have currently got the following:
\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{compat=1.11}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
axis equal,
axis lines = center,
width = 10cm,
height = 10cm,
xlabel = {$x$},
ylabel = {$y$},
zlabel = {$z$},
view/h=45,
]
\addplot3[surf, opacity = 0.5,
samples=21,
domain=0:1,
y domain=0:0.5*pi,
z buffer=sort]
({sqrt(1-x^2) * cos(deg(y))},
{sqrt( 1-x^2 ) * sin(deg(y))},
x);
\end{axis}
\end{tikzpicture}
\end{document}
Which gives me:
But I want the sides to be closed, something like this:
How can I do this?