A mesh plot uses different colors for each mesh segment. The color is determined using a “color coordinate” which is also called “meta data” throughout this document. It is the same data which is used for surface and scatter plots as well.

The code is from the PGFPlots 1.10 manual: “4.6.5 Mesh Plots”.

Mesh plot

		{5*x*sin(2*deg(x)) * y*(1-y)};
Click to download: mesh-plot.texmesh-plot.pdf