# How to get rid of some meshes in ListDensityPlot

I have some data that needs to be represented using the function ListDensityPlot, for example :

data = {{1, 1, 1}, {2, 3, 2}, {1, 4, 3}, {5, 1, 4}, {6, 4, 5}}
ListDensityPlot[data]


And this gives : However, if we show the meshes using this code :

data = {{1, 1, 1}, {2, 3, 2}, {1, 4, 3}, {5, 1, 4}, {6, 4, 5}}
ListDensityPlot[data, Mesh -> All]


It shows this : How can i specify ListDensityPlot to only Plot within the data point, and not plot the region delimited by the triangle {1,1},{2,3},{1,4} (the one on the left side} ?

• Why is that triangle different than the other triangles where data is given at all of the vertices?
– mjw
Apr 8, 2019 at 16:10
• because listdensityplot gives me a a polygon with 4 edges when the result is 5 edges. Same goes for my actual data, i have an n sided polygon when i actually want something like n+10 Apr 8, 2019 at 19:30

Use the option RegionFunction
data = {{1, 1, 1}, {2, 3, 2}, {1, 4, 3}, {5, 1, 4}, {6, 4, 5}}; 