I have data = {{x,y,z},...};
, which I have posted here and when I ContourPlot
in the following way,
data = Import["http://pastebin.com/raw/zHhaM4cb", "Package"];
ListContourPlot[data, PlotRange -> {0, 10}, Mesh -> All, Contours -> Range[0, 10], PerformanceGoal -> "Quality", ImageSize -> {500, 500}]
I get,
There are a few problems here. The dark blue bits jutting out the bottom is Mathematica trying to connect the values at the cusp to the rest of the zero values (I think). I can get rid of that with RegionFunction
so let's ignore that.
The main problem is the corners along the top edge. The data is sampled at thirty points along the x axis, and for each point, there are twelve y values where the function height/value is 0, 1, ..., 10, 10+, where the last number is something larger than 10 - I don't think it's important because I've restricted the range to 10. These points are essentially the points of intersection of the mesh drawn in the picture. They're all there. The interpolation on the right-hand side looks perfect, and then as we move left the interpolation (or something else) goes awry.
I'm a bit stuck!? This is also causing the ListPlot3D
to have unwanted ridges. Is there an interpolation option I can choose that will make this better? Or do I just have to sample more densely along the x-axis?
ListContourPlot
your data as an array of z values. See here and here for examples of that behavior. $\endgroup$