Hi Brett,
I've figured out how to build the contour plot on a cell-by-cell basis. Just need to explicitly specify a ColorFunction and set ColorFunctionScaling -> False as per the attached notebook. This seems like a good approach for contouring irregularly spaced data without having to worry about the contours spilling out beyond the mesh boundary. Perhaps it could be built-in?
On another, not unrelated subject, I'm now noticing some unexpected behaviours when I specify values for InterpolationOrder & MaxPlotPoints. My understanding from the documentation is that, for irregularly spaced data, contours can only be derived by linear interpolation. And this does seem to be the case if I don't set a value for MaxPlotPoints. In which case the contours are derived explicitly from the raw point data by a process of linear interpolation on the triangulated mesh. And setting a value for InterpolationOrder has no effect on the contour plot.
So far, so good. But then I give a value for MaxPlotPoints and start to see some unexpected behaviours when also setting a value for InterpolationOrder. These behaviours are illustrated by the examples titled Cases 1-5 in the last section of the attached notebook. In summary, setting InterpolationOrder to Automatic or 1 seems to result in non-linear interpolation whereas setting InterpolationOrder to 3 seems to result in linear interpolation.
It feels like there may be two stages of interpolation happening when a value is given for MaxPlotPoints. However, the methodology isn't clear and the results of specifying a value for InterpolationOrder are the opposite of what I'd expect. Any clarification would be welcome.
Many thanks,
Ian