您的代码已修改并完成:
\documentclass[10pt,a4paper]{book}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
width=0.5\linewidth,
xlabel=$x$,ylabel=$y$
]
\addplot3[surf,domain=-2:2,domain y=-2:2]
{((x^2+y^2)*exp(-x^2-y^2))};
\end{axis}
\end{tikzpicture}
\end{document}
输出:
![在此处输入图片描述](https://i.stack.imgur.com/MS9Uy.png)