Reputation: 225
I am importing a three column table into Mathematica and using it to make a density plot. However unless you have a very large amount of data in small increments the density plot looks disjointed and obviously not continuous.
is there a way or a function to smooth out my plots?
Thanks, Ben
Upvotes: 4
Views: 2930
Reputation: 4341
I guess what you are looking for is the InterpolationOrder
option. Below is the example from the documentation which shows how it works even for a 6x6 data grid
data = Table[Sin[j^2 + i], {i, 0, Pi, Pi/5}, {j, 0, Pi, Pi/5}];
Table[ListDensityPlot[data, Mesh -> None, InterpolationOrder -> o,
ColorFunction -> "SouthwestColors"], {o, {0, 1, 2, 3}}]
Upvotes: 6
Reputation: 61056
Use InterpolationOrder
:
data = Table[Sin[j^2 + i], {i, 0, Pi, Pi/5}, {j, 0, Pi, Pi/5}];
GraphicsRow@{ListDensityPlot[data, Mesh -> None, InterpolationOrder -> 3],
ListDensityPlot[data, Mesh -> None]}
Upvotes: 3