Non-square data array distorted when using InterpolationOrder->0 in ListDensityPlot

I am trying to fit a list {{x1,y1,f1},{x2,y2,f2},...} with ListDensityPlot. The tricky part is that for a fixed x, the list does not have the same step size in y. I would like to not interpolate the plot, but when I use InterpolationOrder -> 0, the plot fixes data range to the maximum value.

Here is an example to illustrate it

ListDensityPlot[{
{1, 1, 3}, {1, 2, 4}, {1, 3, 4},
{2, 0.5, 1}, {2, 2, 2}, {2, 3.5, 5},
{3, 0.75, 2}, {3, 2, 1}, {3, 3.25, 0}
}]


which yields

Adding InterpolationOrder->0 results in

ListDensityPlot[{{1, 1, 3}, {1, 2, 4}, {1, 3, 4}, {2, 0.5, 1}, {2, 2,
2}, {2, 3.5, 5}, {3, 0.75, 2}, {3, 2, 1}, {3, 3.25, 0}},
InterpolationOrder -> 0]


Is there an easy way to not interpolate the data, but also avoid getting it distorted?

Thanks, Sole

• Could you clarify what you mean by distortion in this case? Commented Jun 4, 2018 at 22:52
• Well, for example, the data point at {1,3} gets pushed to {1,3.5} when using InterpolationOrder->0, which is not a true coordinate of that data point.
– sole
Commented Jun 5, 2018 at 22:20

pts = {{1, 1, 3}, {1, 2, 4}, {1, 3, 4}, {2, 0.5, 1}, {2, 2, 2}, {2,

Note that ListDensityPlot colors always full Voronoi cells with respect to the point cloud pts. That actually quite meaningful.