4

I have the following example which produces a klein bottle. Whatever I compile with the option --shell-escape and I get the following warning:

"<file>.pgf-plot.gnuplot", line 2: ';' expected

Where is my mistake in the example and how can I fix this.

\documentclass{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[axis equal image,axis lines=none,view={150}{40},]
\addplot3 [raw gnuplot,mesh] gnuplot [mesh]{
   set parametric;
   set pm3d explicit;
   set pal rgb 9,9,3;
   set hidden3d;
   set isosamples 18,48;
   set xrange[-8:10];
   set yrange[-9:9];
   set urange[0:2*pi];
   set vrange[0:4*pi];
   x(u,v)= v<pi ? (2.5-1.5*cos(v))*cos(u): v<2*pi ? (2.5-1.5*cos(v))*cos(u): v<3*pi ? -2+(2+cos(u))*cos(v): -2+2*cos(v)-cos(u);
   y(u,v)= v<pi ? (2.5-1.5*cos(v))*sin(u):  v<2*pi ? (2.5-1.5*cos(v))*sin(u):  v<3*pi ? sin(u): sin(u);
   z(u,v)= v<pi ? -2.5*sin(v): v < 2*pi ? 3*v-3*pi: v<3*pi ? (2+cos(u))*sin(v)+3*pi: -3*v+12*pi;
   set multiplot;
   splot x(u,v),y(u,v),-z(u,v) w pm3d
   splot x(u,v),y(u,v),-z(u,v) lt 4
   unset multiplot;
};
\end{axis}
\end{tikzpicture}
\end{document}

Here the relevant part of my file list:

pgfplots.sty    2011/12/29 v1.5.1 (git show 1.5.1-4-g53e640f )
    tikz.sty    2011/06/07 v2.10-cvs (rcs-revision 1.81)

Add-on: How can I increase the size of the picture?

enter image description here

Marco Daniel
  • 95,681

1 Answers1

7

Adding semi-colons after these eliminates the warning:

   splot x(u,v),y(u,v),-z(u,v) w pm3d;
   splot x(u,v),y(u,v),-z(u,v) lt 4;

Adding scale=2 to the \begin{axis} options should increase the size.

Peter Grill
  • 223,288