It's easy show that f(x,y)=2-x^2-y^2 has a maximun value in (x,y)=(0,0), I need a plot show this result. I tried this:
\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[domain=-2:2,y domain=-4:4]
\addplot3[surf] {2-x^2-y^2)};
\end{axis}
\end{tikzpicture}
\end{document}
But it was horrible and $z$
axis don't show value 2 .
Can you help me?