Description Usage Arguments Details Value
Calculate 2D density
1 | get_density(x, y, n = 1000, kern = 0.02)
|
x |
numeric vector; |
y |
numeric vector; |
n |
integer; number of grid points in each direction |
kern |
numeric; size of kernal to use for smoothing |
for colouring points in plot by the density of points, from http://slowkow.com/notes/ggplot2-color-by-density/
numeric vector of density at each point
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.