I have the following plot:
dat = {{255, 255, 255}, {0, 0, 153}, {0, 0, 0}, {204, 0, 0}, {255, 255, 255}};
With[{rgb = RGBColor @@@ (dat/255)}, cf = Blend[rgb, #] &;]
DensityPlot[E^(-2 p0^2 - x0^2/2)/π, {x0, -10, 10}, {p0, -7, 7},
ColorFunction -> cf, PlotLegends -> Automatic, WorkingPrecision -> 1000,
PlotPoints -> 100, MaxRecursion -> 5, PlotRange -> {Full, Full, {-1, 1}}]
I try to fix the Plot Range from -1 to 1, but they only allow me to fix it between the maximum and the minimum value of the function, the problem is that i want to compare different plots from different calculations, I am interested just to fix the plotrange to a given one, independently of the function in the plot. I thought it would be simple, but i cannot manage to do it.
ColorFunctionScaling -> False
. $\endgroup$