Surface plot with interior colors

A surface plot visualizes a two dimensional, single patch using different fill colors for each patch segment. Each patch segment is a (pseudo) rectangle, that means input data is given in form of a data matrix.

We can distinguish between the outer side and the interior parts of a surface by choosing different colors.

The code is from the PGFPlots 1.10 manual: “4.6.6 Surface Plots”.

Interior surface plot

  axis lines=center,
  axis on top,
  xlabel={$x$}, ylabel={$y$}, zlabel={$z$},
  y domain=0:2*pi,
  xmin=-1.5, xmax=1.5,
  ymin=-1.5, ymax=1.5, zmin=0.0,
  mesh/interior colormap=
  	{blueblack}{color=(black) color=(blue)},
  samples y=40,
  z buffer=sort,
Click to download: surface-interior-color.texsurface-interior-color.pdf