# Why ListDensityPlot does not work?

I cannot figure how this ListDensityPlot function works.

From the site:

     ListDensityPlot[{{x1,y1,f1},{x2,y2,f2},…}]


I write

    ListDensityPlot[{{24.5, 20.5, 0.109}, {25.5, 20.5, 0.198}, {26.5,
20.5, 0.338}, {27.5, 20.5, 0.53}, {28.5, 20.5, 0.82}, {29.5, 20.5,
1.2}}]


and it just gives a completely white plot. Thank you for your help!

• Add option DataRange -> All
– Acus
Dec 11, 2018 at 17:26
• Thanks! Now the plot is not white but it has not sense. On the X-axis it goes from 1.0 to 3.0 while on Y-axis it goes from 1 to 6. It should go, approximatively, from 24 to 30 on the X-axis and from 20 to 21 on the Y-axis no? If I add PlotRange -> All and PlotLegends -> Automatic the problem is not solved. Moreover, the legend (that from my understanding should regards the value of f(x,y)) goes from 0 to 25 while it should go to a maximum of roughly 1.3, no? Dec 11, 2018 at 17:43

The problem is that all of your points lie along exactly the same line in y. The second coordinate of all of your points is 20.5. Your density plot is thus infinitely thin. Try adding at least one more point that does not lie in the same line. For example:

ListDensityPlot[{{24.5, 20.5, 0.109}, {25.5, 20.5, 0.198}, {26.5,
20.5, 0.338}, {27.5, 20.5, 0.53}, {28.5, 20.5, 0.82}, {29.5, 20.5,
1.2}, {24.5, 21.5, 0.109}, {25.5, 21.5, 0.198}, {26.5, 21.5,
0.338}, {27.5, 21.5, 0.53}, {28.5, 21.5, 0.82}, {29.5, 21.5, 1.2}}]