If you don't need precisely that scheme, the named gradient scheme SunsetColors
is pretty close to what you want:
f[x_, y_] := (x^2 + y^2)^2 Exp[-((x^2 + y^2)/5)]
DensityPlot[f[x, y], {x, 0, 5}, {y, 0, 5},
ColorFunction -> ColorData["SunsetColors"]]
There are several named color schemes built into Mathematica. The easiest way to browse through them is to type "ColorData
" into an input cell and then select "Choose Color Scheme" from the contextual menu that pops up under your input.
Alternately, you can use Blend
to roll your own scheme that linearly interpolates between purple, orange, and yellow:
DensityPlot[f[x, y], {x, 0, 5}, {y, 0, 5},
ColorFunction -> (Blend[{Purple, Orange, Yellow}, #1] &)]
This can be tweaked by replacing the arguments Purple
, Orange
, or Yellow
with other RGBColor
objects. (For example, the Purple
used by Mathematica is redder, while the purple color in your examples is a bluer shade that I might call "violet". Mathematica's Yellow
also has a higher saturation than the yellow in your examples.) The "speed" of the interpolation can also be controlled; consult the Blend
documentation for details.