I want a cylinder of radius 1 and height 1, centered on the origin above the xy plane and the part of a sphere of radius sqrt(2) centered at the origin, that covers the cylinder.
This is what I have managed to do
\documentclass[tikz,border=3mm]{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
axis lines=middle,
view={340}{25},
domain=0:5,
y domain=0:2*pi,
xmin=-1.5, xmax=1.5,
ymin=-1.5, ymax=1.5,
zmin=0.0,
samples=30,
xlabel=$x$,
ylabel=$y$,
zlabel={$z$},
]
\addplot3 [surf, z buffer=sort, opacity=0.6]
({cos(deg(y))},{sin(deg(y))},{x});
\end{axis}
\end{tikzpicture}
\end{document}
