# Some simple surface drawing using addplot3 for pgfplots won't compile

I am having trouble compiling even some very simple surface drawing using pgfplot and addplot3, for example please see the attached code, I keep getting error saying \begin{axis} on input line 8 ended by \end{document}, and if I commented those two lines of addplot3 out, it is okay, so I am guessing it is not the problem of Tex-live on Ubuntu. Googled but nobody seems to have a similar issue with this. Any idea?

\documentclass{minimal}
\usepackage{pgfplots}
\begin{document}

\begin{tikzpicture}
\begin{axis}
{x*y};
\end{axis}
\end{tikzpicture}

\end{document}

-
Your example compiles fine for me, with TeXlive 2011 on Kubuntu. Are you using the TeXlive version found in the Ubuntu repositories? This is somewhat outdated I think, so perhaps you have an older version of pgfplots. –  Torbjørn T. Nov 6 '11 at 20:44
Yes, I installed tex-live through Synaptic package manager. –  Shuhao Cao Nov 6 '11 at 20:54
Well, I do not know for certain if that is the problem, but as mentioned it works fine for me. Generally it is actually recommended to install TeXlive using the installer from TUG, and not Synaptic, see tex.stackexchange.com/questions/28528/… and tex.stackexchange.com/questions/1092/… –  Torbjørn T. Nov 6 '11 at 20:58
@TorbjørnT. Thanks a lot, I am installing the Texlive 2011 now and I will try afterward see if it works. –  Shuhao Cao Nov 6 '11 at 21:17
The synaptic version is out of date- it uses 2009, not 2011 –  cmhughes Nov 6 '11 at 21:50

The version of pgfplots that is found in the Synaptic repositories is outdated, installing TeXlive 2011 with the installer provided by TUG fixed this. It is actually recommended to use the TUG version, as that allows one to use tlmgr to update the system. See also