contour internally uses integer CData values if colors are not specified, and normally the integers get scaled to the total range of the color map.
If scatter3 is specifically used with the raw zdata values as the colors, then when used in isolation, the raw zdata value range would get scaled to the total range of the color map.
Put these two together and unless the zdata value range happens to be from 1 to the number of contours, the color transform of one or the other is going to be messed up.
I can think of a couple of ways that one might compensate for this, but before going in to them, I would rather that xkudsraw indicate how their code is currently constructed... no point in my detailing a solution if I have guessed wrong about the problem ;-)
Best Answer