4

I'm looking to make a plot for a latex report I'm writing. Effectively the plot is a paraboloid sat ontop of a circle but I'm having some issue creating the surface of revolution for the paraboloid.

I attempted to follow the examples given by cmhughes in Surface of Revolution but get a compilation error, either an unspecified 'finished with exit code 1' or 'Arithmetic overflow \end{axis}' depending on which example I use.

Mike

Example;

\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
 \begin{axis}[view={60}{30}]
  \addplot3[surf,shader=flat,
  samples=20,
  domain=1:2,y domain=0:2*pi,
  z buffer=sort]
  (x,{(1/x) * cos(deg(y))}, {(1/x) * sin(deg(y))});
 \end{axis}
\end{tikzpicture}
\end{document}

Gives the error 'finished with exit code 1'. The log file gives a few messages that I dont quite understand;

! Package pgfplots Warning: Axis range for axis x is approximately     equal; enlargeing it.

! Package pgfkeys Error: I do not know the key '/tikz/surf' and I am going to ignore it. Perhaps you misspelled it.

This error message was generated by an \errmessage
command, so I can't give any explicit help.
Pretend that you're Hercule Poirot: Examine all clues,
and deduce the truth by order and method.


! Package pgfkeys Error: I do not know the key '/tikz/shader' and I am   going to ignore it. Perhaps you misspelled it.

And several others with the same idea that 'I dont know what /tikz/X' is. Used /listfiles to find versions, output is;

 *File List*
 article.cls    2007/10/19 v1.4h Standard LaTeX document class
  size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
inputenc.sty    2008/03/30 v1.1d Input encoding file
    utf8.def    2008/04/05 v1.1m UTF-8 support for inputenc
   t1enc.dfu    2008/04/05 v1.1m UTF-8 support for inputenc
  ot1enc.dfu    2008/04/05 v1.1m UTF-8 support for inputenc
  omsenc.dfu    2008/04/05 v1.1m UTF-8 support for inputenc
pgfplots.sty    2009/02/14 Version 1.2.2
    tikz.sty    2010/10/13 v2.10 (rcs-revision 1.76)
     pgf.sty    2008/01/15 v2.10 (rcs-revision 1.12)
  pgfrcs.sty    2010/10/25 v2.10 (rcs-revision 1.24)
everyshi.sty    2001/05/15 v3.00 EveryShipout Package (MS)
  pgfrcs.code.tex
 pgfcore.sty    2010/04/11 v2.10 (rcs-revision 1.7)
graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
  keyval.sty    1999/03/16 v1.13 key=value parser (DPC)
graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg    2009/08/28 v1.8 graphics configuration of TeX Live
  pdftex.def    2010/03/12 v0.04p Graphics/color for pdfTeX
  pgfsys.sty    2010/06/30 v2.10 (rcs-revision 1.37)
  pgfsys.code.tex
pgfsyssoftpath.code.tex    2008/07/18  (rcs-revision 1.7)
pgfsysprotocol.code.tex    2006/10/16  (rcs-revision 1.4)
 xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)
   color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive
 pgfcore.code.tex
pgfcomp-version-0-65.sty    2007/07/03 v2.10 (rcs-revision 1.7)
pgfcomp-version-1-18.sty    2007/07/23 v2.10 (rcs-revision 1.1)
  pgffor.sty    2010/03/23 v2.10 (rcs-revision 1.18)
 pgfkeys.sty    
 pgfkeys.code.tex
  pgffor.code.tex
    tikz.code.tex
supp-pdf.mkii
 ***********

Problems above stem from outdated pgf and pgfplots which is now rectified.

  • 2
    Mike, welcome to TeX.SX! Would you please add a minimum working example? Suggestions at http://meta.tex.stackexchange.com/a/3368/38377 . In this case, "working" means that it exhibits the error you describe. – cxw Aug 14 '15 at 12:40
  • 1
    Thanks for adding the error message. I believe this may be due to outdated packages: could you check what version of TikZ/PGF and PGFPlots you are using? – Jake Aug 14 '15 at 13:59
  • @Jake /listfiles output edited in – Mike Pegg Aug 15 '15 at 14:57

1 Answers1

4

Your version of pgfplots is outdated (as suggested by @Jake).

Please upgrade both pgfplots and pgf to the most recent versions and retry.

  • Done, thanks. With that sorted I've basically solved my initial problem, all but the last step, detailed in the edit. I would appreciate it if you could look over it for me. – Mike Pegg Aug 17 '15 at 12:36
  • I am glad the answer helped. I would suggest you make a new question out of the "last step" such that the questions are not mixed and make a good reference for the future. It would also allow you to mark this question as "answered" such that others know how to solve the problem at hand. – Christian Feuersänger Aug 17 '15 at 20:35