(by making a mistake) I realised that ColorFunctionScaling can take a list of numerical arguments rather than just booleans. The following is true for ContourPlot and DensityPlot but not Plot3D and haven't searched further. The first argument seems to affect the endpoint values of the scaling and the second argument the gradient (although not entirely sure about this statement). Anyway, here's what I mean:
GraphicsGrid@Table[ContourPlot[x, {x, 0, 2}, {y, -1, 1}, ColorFunctionScaling -> {i, j}, Frame -> False], {i, -1, 2, .5}, {j, -1, 2, .5}] My questions are:
- Is this a feature?
- How, if at all, can I control it accurately in a way that two contour plots, say
ContourPlot[x, {x, 0, 2}, {y, -1, 1}]andContourPlot[x, {x, -2, 0}, {y, -1, 1}]can have a common colour reference without resorting to redefining theColorFunctionand setting the scaling to false? - Does it affect other plotting functions?




Framed@GraphicsGrid@Table[ ContourPlot[x, {x, 0, 2}, {y, -1, 1}, Frame -> False, PlotLabel -> {i, j}, Contours -> 40, ImageSize -> 200, ## ] , {i, -2, 2, 2}, {j, -2, 2, 2} ] & @@@ { {ColorFunctionScaling -> {i, j}, ColorFunction -> (Hue[#] &)}, {ColorFunction -> (Hue[(j - i) #] &)} }but don't ask me why. $\endgroup$