I am plotting a continuous scalar function of three variables with this code:
function = (
E^(-((2 (300 + 20 x + x^2 + 20 y + 2 y^2))/(
4 + t^2))) (E^((2 (100 + 40 x + y^2))/(4 + t^2)) + E^((
2 (100 + 40 y + y^2))/(4 + t^2)) +
2 E^((2 (20 x + (10 + y)^2))/(4 + t^2))
Cos[(20 t (x - y))/(4 + t^2)]))/(π (4 + t^2));
DensityPlot3D[function, {x, -60, 60}, {y, -60, 60}, {t, 0, 60},
ColorFunction -> "Rainbow",
PlotLegends -> BarLegend["Rainbow"], PlotPoints -> 200]
The resulting plot has almost all of the dynamic range hidden below the dark blue blobs at the bottom, while I want to emphasize details of the light purple blobs in the middle and top. The transition between the blue and purple blobs also seems too sharp, and the gray bar alongside the bar legend seems to exclude most of the purple. Are there better ways to plot this function?
ContourPlot3D
. That's how I visualize 3D wavefunctions. Second, you can use a non-linearOpacityFunction
that allows for more definition in the blobs by cutting down on opacity. $\endgroup$ – b3m2a1 Sep 5 '19 at 19:52Log[function + 1*^-5]
gives something a bit more reasonable already). The issue is thatDensityPlot3D
seems to sample very few colors in the interesting region, because all the values there only cover a tiny part of the range of all values $\endgroup$ – Lukas Lang Sep 5 '19 at 20:11ColorFunction
$\endgroup$ – b3m2a1 Sep 5 '19 at 21:26ColorFunction
(viaSow
/Reap
) indicates that theColorFunction
is just uniformly sampled ~300 times. So no matter how non-linear theColorFunction
is, it seems impossible to get more resolution than that... (unless I'm missing something) $\endgroup$ – Lukas Lang Sep 5 '19 at 21:32