# How to plot "$f(x,y) = x^2 + y^2$ on $(0,0) \times (1,1)$?

Hello Friends Thanks for your time.

Please help in plotting $f(x,y) = x^2 + y^2$ on a unit square with TikZ.

Thanks.

-
add comment

## 1 Answer

Here is a very basic approach derived from an example in the pgfplots manual.

\documentclass{minimal}
\usepackage{pgfplots}

\begin{document}
\begin{tikzpicture}
\begin{axis}[colorbar]
\addplot3[surf,faceted color=blue,samples=15,domain=0:1,y domain=0:1]{x^2+y^2};
\end{axis}
\end{tikzpicture}
\end{document}


Desired modifications are left to the interested reader.

-
@Donig. Thank you. –  Mia Apr 20 '11 at 9:02
add comment