Simple Question: I want to create beautiful density plots like those on a Wikipedia page:
Mathematica has a lot of built-in color functions but none of them is as good as Wikipedia's. I tried "Rainbow", "DarkRainbow", Hue, "TemperatureMap" and "ThermometerColors" so far.
I plot density plots of Zernike Polynomials with "Zernike.m" package. The code I use is as follows:
ClearAll["Global`*"]
<< "Zernike.m"
Table[DensityPlot[
Zernike[i, Norm[{x, y}], ArcTan[x, y]], {x, y} \[Element] Disk[],
PlotRange -> All, ColorFunctionScaling -> False, PlotPoints -> 100,
Frame -> False, ColorFunction -> "TemperatureMap",
ColorFunctionScaling -> True], {i, 1, 10}]
And the result I'm not satisfied is as follows:
How can I use a color function or create a color function like the one on the Wikipedia? Any advice is appreciated.
ColorFunctionScaling -> False
andColorFunctionScaling -> True
in your options? Part of the problem is that the default range for color functions is between 0 and 1; it looks like your polynomials have negative values in some regions (hence the solid blue) and values greater than +1 in others (the solid red regions.) $\endgroup$