list plot over arbitrary domain

I have a weird problem. I present here a minimal example. I wish to ListPlot3D over a non-rectangular domain. For that I build a grid:

grid = Flatten[Outer[If[Abs[#2] > #1, {#1, #2}, (## &[])] &, Range[0, 10],
Range[-10, 10]], 1];

To make sure I plot the grid points:

ListPlot[grid]

e8rt8 list plot over arbitrary domain

I now map a function over my grid and plot it:

f = {#[[1]], #[[2]], (#[[1]] + #[[2]])^2} &;
ListPlot3D[ParallelMap[f, grid]]

As far as I under stand I should see a plot of my function over the domain which I specified, but instead I see this:

7bXpo list plot over arbitrary domain

I see the same issue with the contour plot:

4tulp list plot over arbitrary domain

Can someone elaborate on what’s going on? Why do the plot function continue my domain. Based on which data is the continuation done? I see the same behaviour even if I set InterpolationOrder->0? How can I force MMA to stick to my domain?

Let’s block ads! (Why?)

Recent Questions – Mathematica Stack Exchange