QuickLaTeX

[latexpage] \begin{tikzpicture}
[+preamble] \usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
[/preamble] \begin{axis}
\addplot3[surf,domain=0:360,samples=40] {cos(x)*cos(y)};
\end{axis}
\end{tikzpicture}