# Non-regular grid data

I have issue with non-regulary spaced data. I have set of 3 numbers {x, y, z} in my list.

data={{-33335.6,15525.1,20722.4},{-33231.7,15509.8,20723.5},<<99852>>,{-32909.4,26425.3,20957.6},{-33021.5,26438.1,20954.4}}


I can plot my data with ListDensityPlot.

I just want to get those data (interpolated) from the plot for further processing. If one uses

ListInterpolation[data, { {Min[xValues],
Max[xValues]}, {Min[yValues], Max[yValues]}},
InterpolationOrder -> 2]


Interpolation is poor, I suppose because data are not on regular tensor grid. Is there way just to get what Mathematica is doing for ListDensityPlot ?

• Could you post (at least) a sample of your data ? – b.gates.you.know.what Feb 25 '13 at 8:14
• for example {{20959.8,24054.4,2022.6},{20959.1,24054.6,2044.44},{20959.8,24053.,2026.29},{20957.7,24054.6,2014.58},{20958.6,24054.,2034.33},<<39990>>,{16958.4,31988.8,2110.87},{16803.8,31820.2,2107.43},{16650.3,31654.6,2102.42},{16496.8,31486.9,2101.77},{16341.7,31320.,2098.09}} – Bob Feb 25 '13 at 8:36
• Do not post data in a comment. Make the data available by editing your question. – m_goldberg Feb 25 '13 at 11:17

## 1 Answer

Using the data you provided :

data = {{20959.8, 24054.4, 2022.6}, {20959.1, 24054.6, 2044.44}, {20959.8, 24053., 2026.29},
{20957.7, 24054.6, 2014.58}, {20958.6, 24054., 2034.33}, {16958.4,31988.8, 2110.8 },
{16803.8, 31820.2, 2107.43}, {16650.3, 31654.6, 2102.42}, {16496.8, 31486.9, 2101.77},
{16341.7, 31320., 2098.09}};

ListDensityPlot[data] DensityPlot[Interpolation[data, InterpolationOrder -> All][x, y], {x, 16000, 21000}, {y, 24000, 32000}]
` • I forgot to say, I am using ver. 7 DensityPlot[Interpolation[data, InterpolationOrder -> All][x, y], {x, 16000, 21000}, {y, 24000, 32000}] it returns: Interpolation::indim: The coordinates do not lie on a structured tensor product grid. >> – Bob Feb 25 '13 at 22:13