get_density: Calculate 2D density

Description Usage Arguments Details Value

Description

Calculate 2D density

Usage

1
get_density(x, y, n = 1000, kern = 0.02)

Arguments

x

numeric vector;

y

numeric vector;

n

integer; number of grid points in each direction

kern

numeric; size of kernal to use for smoothing

Details

for colouring points in plot by the density of points, from http://slowkow.com/notes/ggplot2-color-by-density/

Value

numeric vector of density at each point


MyersGroup/testisAtlas documentation built on Nov. 29, 2020, 9:21 p.m.