1.14.1 Surface plotting

The surface plot style is similar to the colormap and contourmap plot styles, but produces maps of the values $$z(x,y)$ of functions of two variables using three-dimensional surfaces. The surface is displayed as a grid of four-sided elements, whose number may be specified using the {\tt set samples} command\index{set samples command@{\tt set samples} command}, as in the example 

\begin{verbatim} 
set samples grid 40x40
\end{verbatim}

 If data is supplied from a data file, then it is first re-sampled onto a regular grid using one of the methods described in Section~ \ref{sec:colormaps}. 

The example below plots a surface indicating the magnitude of the imaginary part of 

$(x+iy)$: 

\vspace{2mm} \input{examples/tex/ex_ surface_ log_1.tex} \vspace{2mm} 

\centerline{\includegraphics[width=10cm]{examples/eps/ex_ surface_ log}} \vspace{2mm} 

 \upshape \mdseries \rm \vspace{-5mm} \begin{longtable}{|>{\columncolor {LightGrey}}p{\textwidth }|} In this example, we plot a surface showing the value of the expression 

\end{longtable}

$x^3/20+y^2$, and project below it a series of contours in the $(x,y)$ plane. \vspace{3mm}\\ \noindent \input{examples/tex/ex_ surface_ polynomial_1.tex} \vspace{3mm}\\ \noindent \begin{center}  \includegraphics[width=10cm]{examples/eps/ex_ surface_ polynomial} \end{center}  $

In this example, we produce a surface showing the function

$$sinc(r)$ where $r=x^2+y^2$. To produce a prettier result, we vary the color of the surface such that the hue of the surface varies with azimuthal position, its saturation varies with radius $r$, and its brightness varies with height $z$. \vspace{3mm}\\ \noindent \input{examples/tex/ex_ surface_ sinc_1.tex} \vspace{3mm}\\ \noindent \begin{center}  \includegraphics[width=10cm]{examples/eps/ex_ surface_ sinc} \end{center}  $