getPointDensity: getPointDensity

View source: R/mu_ggplots2_ext.R

getPointDensityR Documentation

getPointDensity

Description

Get point density of points in 2 dimensions. Code from http://slowkow.com/notes/ggplot2-color-by-density/

Usage

getPointDensity(x, y, n = 100)

Arguments

x

A numeric vector.

y

A numeric vector.

n

Create a square n by n grid to compute density.

Value

The density within each square


demuellae/muRtools documentation built on Sept. 8, 2023, 4:32 p.m.