I'm trying to render a circular cylinder, mathematically defined as $y^2+z^2=r^2, x\in [0,5]$.
Here the MWE:
\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
axis lines=middle,
xlabel=$x$,ylabel=$y$, zlabel={$z$},
xmin = 0, xmax=5,
ymin=-2, ymax=2,
zmin=-2, zmax=2]
\addplot3[surf,shader=flat,gray,samples=2,samples y=10,
domain=0:5,z buffer=sort,
opacity=0.5] (x, {sin(deg(y))}, {cos(deg(y))});
\end{axis}
\end{tikzpicture}
\end{document}
compat
level (version) when using PGFPlot.