LKremer/ggpointdensity

How exactly the number of neighbors is calculated?

bkenm opened this issue · 1 comments

bkenm commented

Sorry if I didn't understand the adjust parameter, but if you could help in this issue, I would appreciate a lot.

The question is mainly about the bandwidth. What do you mean by default bandwidth? I calculated for some values for adjust, but still, it's hard to understand precisely the distance threshold.

Thank you for your attention.

xrange <- diff(scales$x$get_limits()) * adjust
yrange <- diff(scales$y$get_limits()) * adjust
r2 <- (xrange + yrange) / 70