# puzzled with ColorData [closed]

At first let me thank, from this point as well, those that they replied to my previous queries.

From a reply I got, I obtained finally the desired graph.

lst = {10*Cos[u]*Sin[v], 3*Sin[u]*Sin[v], 2*Cos[v]};
dam = Sqrt[(1296*Cos[u]^4*
Sin[v]^4)/(900*Cos[v]^2 + 36*Cos[u]^2*Sin[v]^2 +
400*Sin[u]^2*Sin[v]^2)^2 + (3600*Cos[u]^2*
Sin[v]^2*(9*Cos[v]^2 + 4*Sin[u]^2*Sin[v]^2))/(900*Cos[v]^2 +
4*(9*Cos[u]^2 + 100*Sin[u]^2)*Sin[v]^2)^2];
colFun = Function[{u, v}, Evaluate@Hue[Rescale[dam, {0, 1}]]];
{min, max} = {0, 1};
ParametricPlot3D[lst, {u, 0, 2*Pi}, {v, 0, Pi}, Mesh -> False,
ColorFunction -> (colFun[#4, #5] &), ColorFunctionScaling -> False,
PlotRange -> All, ImageSize -> 800,
PlotLegends ->
BarLegend[{Hue, {min, max}}, ColorFunctionScaling -> True]]


Now, what I want is to check the outputs of other available color schemes.

I did the following:

coldata = ColorData["Gradients"];
col = Table[{i, coldata[[i]], ColorData[coldata[[i]]]}, {i, 51}];


So, for instance (for ColorData["BrightBands"])

{min, max} = {0, 1};
lst = {10*Cos[u]*Sin[v], 3*Sin[u]*Sin[v], 2*Cos[v]};
colFun = Function[{u, v}, Evaluate@col[[10, 3]][Rescale[dam, {0, 1}]]];
h = ParametricPlot3D[lst, {u, 0, 2*Pi}, {v, 0, Pi}, Mesh -> False,
ColorFunction -> (colFun[#4, #5] &), ColorFunctionScaling -> False,
ImageSize -> 800,
PlotLegends ->
BarLegend[{colFun, {min, max}}, ColorFunctionScaling -> True]]


The coloring of the ellipsoid is as desired, but this does not hold true for the color bar.

-

## closed as off-topic by Karsten 7., MarcoB, Sjoerd C. de Vries, blochwave, Bob HanlonOct 10 '15 at 2:05

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Karsten 7., MarcoB, Sjoerd C. de Vries, blochwave, Bob Hanlon
If this question can be reworded to fit the rules in the help center, please edit the question.

You defined your function colFun to expect two arguments. It is not clear what you want the result to look like, therefore here are three different possible solutions:

ParametricPlot3D[lst, {u, 0, 2*Pi}, {v, 0, Pi}, Mesh -> False,
ColorFunction -> (colFun[#4, #5] &), ColorFunctionScaling -> False,
ImageSize -> 800,
PlotLegends -> BarLegend[{colFun[#, #] &, {min, max}}]]


ParametricPlot3D[lst, {u, 0, 2*Pi}, {v, 0, Pi}, Mesh -> False,
ColorFunction -> (colFun[#4, #5] &), ColorFunctionScaling -> False,
ImageSize -> 800,
PlotLegends -> BarLegend[{col[[10, 3]][#] &, {min, max}}]]


ParametricPlot3D[lst, {u, 0, 2*Pi}, {v, 0, Pi}, Mesh -> False,
ColorFunction -> (colFun[#4, #5] &), ColorFunctionScaling -> False,
ImageSize -> 800,
PlotLegends -> BarLegend[{col[[10, 3]][#] &, {min, max}}, 20]]


-
Thank you very much for the answer (amazng after one year:)!). It was very helpful. – dimitris Oct 9 '15 at 7:49