# Plot f(x,y)=2-x^2-y^2, extrema value

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]

\end{axis}

\end{tikzpicture}

\end{document}


But it was horrible and $z$ axis don't show value 2 . Can you help me?

If you use the correct viewing angle, you can see that the max z is in fact at 2.

\documentclass{standalone}
\usepackage{pgfplots}
\usepackage{tikz-3dplot}

\begin{document}

\begin{tikzpicture}
\begin{axis}[domain=-2:2,y domain=-4:4, view={60}{0},
extra z ticks={2}]