I am trying to produce a ListDensityPlot
but I am having issues with aliasing. The problem arises from the way that Mathematica is breaking up the mesh into triangles, such that the orientations of the triangles is always in one direction, such that along one edge where there is a steep change in the function it appears smooth but along another edge is appears jagged. This is purely artificial due to the nature of the mesh, and could be solved if I could use a mesh which was somewhat more isotropic or which was axisymmetric about the center, but I cannot figure out how to do this. I'm surprised the mesh does not adapt where the derivative becomes large.
I am attaching two plots, with and without the mesh to demonstrate the issue. You can see aliasing on the top left and bottom right edges, whereas the top right and bottom left edges appear smooth. I am pretty certain this is caused by the mesh, as you can see in the second image the triangles are oriented differently along these different edges. The data set used to generate the plot is a simple square lattice. All help appreciated.
ListDensityPlot[data, ColorFunction -> "SunsetColors"]
ListDensityPlot[data, ColorFunction -> "SunsetColors", Mesh->All]
Edit:
Changing the interpolation order does not fix the issue, as per Henrik's response:
GraphicsGrid[
Partition[
Table[ListDensityPlot[data, ColorFunction -> "SunsetColors",
InterpolationOrder -> i], {i, 1, 6}],
3],
ImageSize -> Full]
InterpolationOrder -> 3
... $\endgroup$