I've had the same effect in Mathematica 9 and 10.
I'm trying to color a 3D Plot with another function, let's call it colorFun ( it should highlight the areas where the colorFun is above a certain threshold), but ColorFunction seems to use the wrong coordinates.
Horribly colored minimal example
colorFun := Function[{x, y},If[x < y, Red, Blue]]
Plot3D[Evaluate[x^2+y^2],{x,0,1},{y,0,2},ColorFunction->colorFun]
Note that x and y have different intervals plotted, so the divide should not be through the middle. Similar things happen if you change the colorFun to something like y<0.5 . It seems that the ColorFunction is not using the same coordinates as the function, but rather a kind of normalized version, always going from 0 to 1.
Is this a bug, or is Mathematica beating my ability to understand computers again?
ColorFunction
are in fact scaled to [0,1] by default. To avoid that, useColorFunctionScaling -> False
. $\endgroup$