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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?


\addplot3[surf,domain=0:10,samples=40, shader=interp]

share|improve this question
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
up vote 5 down vote accepted

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

share|improve this answer

Your Answer


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.