% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions_single_cell.R
\name{get_density}
\alias{get_density}
\title{Calculate 2D density}
\usage{
get_density(x, y, n = 1000, kern = 0.02)
}
\arguments{
\item{x}{numeric vector;}

\item{y}{numeric vector;}

\item{n}{integer; number of grid points in each direction}

\item{kern}{numeric; size of kernal to use for smoothing}
}
\value{
numeric vector of density at each point
}
\description{
Calculate 2D density
}
\details{
for colouring points in plot by the density of points, from http://slowkow.com/notes/ggplot2-color-by-density/
}
