开发者

White area in Mathematica ListPlot

开发者 https://www.devze.com 2023-03-28 05:52 出处:网络
When I create and plot this list: var = 2; okList = {{0.8, var, 0.8, 0.8}, {0, 0.3, 0.6, 0.9}, {0, 1, 2, 3}};

When I create and plot 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"]

White area in Mathematica ListPlot

or, unscaled, like this:

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

White area in Mathematica ListPlot

I get a开发者_高级运维 fully coloured square, as I'd expect.

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.

White area in Mathematica ListPlot

which plotting with ColorFunctionScaling->False doesn't get rid of

White area in Mathematica ListPlot

The ColorFunction SandyTerrain doesn't have any white in it, so this must be ListDensityPlot not plotting anything in that area.

What could cause this to happen, and how do I stop it?


It's getting clipped by the automatic plot range calculation. Try with PlotRange -> All or ClippingStyle -> Automatic.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号