On the following plot example, I get a division by zero error (10.4.1):
ListPointPlot3D[{{1, 1, 1}, {2, 2, 2}}, ColorFunction -> Function[{x, y, z}, ColorData["TemperatureMap"][1/x]]]
(*Power::infy: Infinite expression 1/0. encountered. >>*)
while there seems to be no problem with the ColorFunction:
Function[{x, y, z}, ColorData["TemperatureMap"][1/x]] @@@ {{1, 1, 1}, {2, 2, 2}}
For what I could get, this is true also for other type of plots.
We can try to do the scaling ourselves (not that with the way it is defined this should matter).
MinMax[1/#[[1]] & /@ {{1, 1, 1}, {2, 2, 2}}]
(*{1/2, 1}*)
Rescale[1/#[[1]], MinMax[{1/2, 1}]] & /@ {{1, 1, 1}, {2, 2, 2}}
(*{1, 0}*)
But it works:
ListPointPlot3D[{{1, 1, 1}, {2, 2, 2}},
ColorFunction -> Function[{x, y, z}, ColorData["TemperatureMap"][
Rescale[1/x, MinMax[1/#[[1]] & /@ {{1, 1, 1}, {2, 2, 2}}]]]],
ColorFunctionScaling -> False]
What's going on? It seems that Mathematica is defining the color scale outside the plot range. If so, why?
Trace[]
on the plot shows that an expression like(Blend["TemperatureMap", 1/#1] &) @@ {1. (#1 - 1.), 1. (#2 - 1.), 1. (#3 - 1.)} &
is being evaluated at your points, and that will indeed choke on{1, 1, 1}
. $\endgroup$