I have a data
set which is a list of pairs. From this I can easily make a 3d histogram with Histogram3D[data]
or a smoothed projection of it to the plane with SmoothDensityHistogram[data]
. What I would like to obtain is a smoothed contour line within which the data count has a given value or higher. Essentially this would be a single customizable contour line in the plot produced by SmoothDensityHistogram[data]
.
Ultimately I would need to combine several such contour lines in a single plot. How would I achieve this?
I investigated a bit and found that this approach
data1 = RandomVariate[BinormalDistribution[.75], 10];
distribution1 = SmoothKernelDistribution[data1];
data2 = RandomVariate[BinormalDistribution[.75], 10];
distribution2 = SmoothKernelDistribution[data2];
Sow[ContourPlot[
PDF[distribution1, {x, y}] == 10^(-2), {x, -3, 3}, {y, -3, 3},
ContourStyle -> Opacity[0.4], ContourShading -> None],
ContourPlot[
PDF[distribution2, {x, y}] == 10^(-2), {x, -3, 3}, {y, -3, 3},
ContourStyle -> Opacity[0.4], ContourShading -> None]]
should be producing what I want.
The remaining problem is that the resulting plot shows only one of the contour lines as if the background of the plots was not transparent. Any ideas?
f(x,y)
of two variables (I could turn it into a probability distribution function by normalization). I want to plot a specific contour line which satisfiesf(x,y)=const
. As I mentioned this this would be a contour line in aSmoothDensityHistogram[]
plot. $\endgroup$