White area in Mathematica ListPlot

When I create and draw this list:

var = 2;
okList = {{0.8, var, 0.8, 0.8}, {0, 0.3, 0.6, 0.9}, {0, 1, 2, 3}};
lp = ListDensityPlot[okList, ColorFunction -> "SandyTerrain"]

scaled

or, without scaling, as follows:

lp = ListDensityPlot[okList, ColorFunction -> "SandyTerrain",
     ColorFunctionScaling -> False]

unscaled

I get a fully colored square as I expected.

But when I try this:

var = 0.8;
list = {{0.8, var, 0.8, 0.8}, {0, 0.3, 0.6, 0.9}, {0, 1, 2, 3}};
problem = ListDensityPlot[list, ColorFunction -> "SandyTerrain"]

I get a white patch in the corner.

problem

which with the help of ColorFunctionScaling-> False does not get rid of

problem_scaled

There is no white color in the ColorFunction SandyTerrain, so it should be a ListDensityPlot without creating anything in this area.

What can cause this to happen, and how to stop it?

+5
source share
1 answer

It gets hooked by automatically calculating the range of plots. Try using PlotRange -> Allor ClippingStyle -> Automatic.

+6

All Articles