The documentation of ColorFunction
states that in ListContourPlot3D
your chosen function gets the arguments x
, y
, z
and f
. However, if you actually use any argument other than the first an error is raised in Mathematica 12.2, yet strangely enough the plot is (most of the times) shown as expected.
Consider for example
list1 = Table[{x, y, z, x^2 + y^2 - z^2}, {x, -1, 1, .05}, {y, -1, 1, .05}, {z, -1, 1, .05}]~Flatten~2;
ListContourPlot3D[list1, Contours -> {0.3}, PlotRange -> {{-1, 1}, {-1, 1}, {-1, 1}}, ColorFunction -> Function[{x, y, z, f}, Hue[z]], ColorFunctionScaling -> False]
This produces the error
Function::fpct: Too many parameters in {x,y,z,f} to be filled from Function[{x,y,z,f},Hue[z]][0.3].
But the generated graphics seem OK:
Is this a bug, or am I doing something wrong here?
ContourPlot3D[x^2 + y^2 - z^2, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}, Contours -> {0.3}, PlotRange -> {{-1, 1}, {-1, 1}, {-1, 1}}, ColorFunction -> Function[{x, y, z, f}, Hue[z]], ColorFunctionScaling -> False]
is well. $\endgroup$