Example: Surface plot with interior colors

Published 2014-03-15 | Author: Christian Feuersänger

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”.

Download as: [PDF] [TEX]  •  [Open in Overleaf]

Surface plot with interior colors

Do you have a question regarding this example, TikZ or LaTeX in general? Just ask in the LaTeX Forum.
Oder frag auf Deutsch auf TeXwelt.de.

  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,


Adding comments is currently not enabled.