# Extract Density values from a Smooth density plot

I have a SmoothDensityPlot[] of a set of about 10^5 x,y points (data21fps) like this

SmoothDensityHistogram[data21fps,
PlotRange -> {{0, 200}, {0, 200}}]


I would like to get a the density value of each point of the plot. I have seen this post Obtain data points from a density plot but I have been testing Reap[] and Sow[] but the Graphics object is different and I do not know how to get the values of the plot.

Thank you very much for the help

EDIT

Testing the comments to this question I have tested my dataset

D = SmoothKernelDistribution[data21fps]
DensityPlot[PDF[D, {x, y}], {x, 0, 200}, {y, 0, 200},
ColorFunction -> "SunsetColors"]


obtaining the following plot

However, the graduation is different than in the original SmoothDensityHistogram[]. I have tried options of SmoothKernelDistribution like ÌnterpolationPoints,MaxRecursion, andPerformanceGoalbut the results still are different of the originalSmoothDensityPlot.

• Please have a look at the documentation, specifically in the section "Properties and relations". There you will find an example that shows how SmoothDensityPlot is nothing but DensityPlot applied to SmoothKernelDistribution. i.e., if you want the data, use SmoothKernelDistribution. – C. E. Sep 8 '17 at 18:26
• @C.E. Thank you, that is what I need it. Can I ask you how to get the absolute values for each point instead of the kernel density estimation? – user1993416 Sep 8 '17 at 19:07
• If d is what SmoothKernelDistribution returns, then you can use either PDF[d, {x, y}] for the probability density, or CDF[d, {x,y}] for the cumulative distribution value at {x,y}. The value using PDF is what SmoothDensityPlot shows you. – C. E. Sep 8 '17 at 20:14
• @C.E. I have edited the post with the plot using SmoothKernelDistribution[] but the result is not the same – user1993416 Sep 8 '17 at 23:02
• @user1993416 You can specify the bandwidth selection method and the kernel. They are listed in the documentation under "Details and Options" – so try that and see if you can figure out what settings SmoothDensityPlot` uses. – C. E. Sep 8 '17 at 23:43