How do I acheive something like InterpolationOrder
in ListContourPlot
for ContourPlot
? My main problem is I want to smooth the contours in ContourPlot
.
I have some points which I'm going to call data, which is 10,000 points and looks like this:
{{24.3,40.0},{29.2,56.0} ... }
I create this distance function:
D[x_,y_]=(#[[1]]-x)^2+(#[[2]]-y)^2&/@data
Now, my function is supposed to count the number of points within a certain distance of any x,y position and divide by the total number of points:
F[x_,y_,r_]:=Length[Select[D[x,y],(#<r^2)&]]/Length[data]
Now I can plot my function,
ContourPlot[F[x,y,5],{x,0,100},{y,0,100}]
The problem is my function is not naturally smooth.
I know about SmoothDensityHistogram
and DensityHistogram
, but I like the more simple look of smoothed contours. Can anyone help with this?
EuclideanDistance[#,{x,y}]&/@ data
and are instead rolling your own distance function? $\endgroup$