I want to make a 3D plot where the ColorFunction
is different depending on whether the function value is positive or negative. I know how to do the following:
mycf[z_] := Piecewise[{{Red,z<=0},{Blue,z>0}}]
Plot3D[myfunc[x, y], ..., ColorFunction -> mycf, ColorFunctionScaling -> False]
But what I really want is to have gradients rather than uniform colors.
I'd also like to use the full scale of the colors in both directions. So if the positive values are between 0 and 2 and the color scale is rainbow, I want 0 to be purple and 2 to be red; if the negative values only go to -0.5 and the color scale is grayscale, I want 0 to be black and -0.5 to be white.