I am trying to make a DensityPlot
employing a NormalDistribution
. It works more or less as I want, but I would like to show the colors relative only to the vertical distribution of the function, instead of absolute to all the values in the plot.
Here is an example of what I am trying to make:
a = 0.1;
b = 0.01;
s0 = 0.1;
mu[x_] := 1./(1. + Exp[-a x]);
s[x_] := s0 Exp[-b x];
f[x_, y_] := PDF[NormalDistribution[mu[x], s[x]], y];
DensityPlot[f[x, y], {x, 0, 100}, {y, 0, 1},
ColorFunction -> ColorData[{"SunsetColors", {1/2, 0}}],
ColorFunctionScaling -> True, PlotTheme -> "Scientific",
PlotLegends -> None, AspectRatio -> 1./GoldenRatio,
PlotRange -> {{0, 100}, {0, 1}, Full}, PlotPoints -> 50,
FrameLabel -> {"x", "y"}]
I would like to show how the standard deviation of the distribution decays in the horizontal direction, with all the mean values (peaks) with equal color intensity. However, I haven't been successfull so far.
Any idea how can this be done in Mathematica?
Thanks in advance for any help!