Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Hello Friends Thanks for your time.

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

Thanks.

share|improve this question
add comment

1 Answer

up vote 6 down vote accepted

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.


enter image description here

share|improve this answer
    
@Donig. Thank you. –  Mia Apr 20 '11 at 9:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.