When I try to plot a 2D interpolation, coloring areas with RegionPlot
and adding contours with ContourPlot
, the boundary given by RegionPlot
and the contours from ContourPlot
don't always agree. Why is this and how do I fix it?
dataList = Uncompress @ Import["http://pastebin.com/raw.php?i=zUrJkXR4"];
area = ConvexHullMesh[dataList[[All, 1 ;; 2]]];
dataList[[All, 1 ;; 2]] +=
RandomReal[10^-5*{-1, 1}, Dimensions[ dataList[[All, 1 ;; 2]]]];
(* Recommended by Mathematica to avert zero-size triangulations *)
funct = Interpolation[dataList];
contour = ContourPlot[funct[a, b] == 124 , {a, b} ∈ area];
region = RegionPlot[funct[a, b] <= 124, {a, b} ∈ area];
Show[{region, contour}]
This produces
PlotPoints
inRegionPlot
. $\endgroup$