densityplot2d: Plots a 2D Density

Description Usage Arguments Examples

Description

This function tries to replicate 'smart' 2D density plots as they are found in flow cytometry data analysis software. These plots commonly work with millions of points. In dense regions, they will plot these as a heatmap; in sparse regions, they will show the actual points.

Usage

1
2
3
4
densityplot2d(x, y, z = NULL, nbins = 50, max.points = 5,
  colfunc = colorRampPalette(c("gray", "darkblue", "lightblue", "green",
  "yellow", "orange", "red")), tf.fun = identity, pch = 19, cex = 0.3,
  color.levels = 20, ...)

Arguments

x

vector containing the X coordinates of the points.

y

vector containing the Y coordinates of the points. which are passed on to the plotting function so the plot can be customized.

nbins

how many bins to use for histogram.

max.points

when to start plotting heatmap instead of individual points.

colfunc

color mapping for heatmap.

tf.fun

function to apply to histogram values before plotting them, log can be useful.

pch

point character to use for individual points.

cex

point character expansion to use for individual points.

color.levels

how many different colors to use for heatmap.

...

further arguments to be passed to the plotting function, such as xlim or xlab.

Examples

1
densityplot2d( facsdata[,1], facsdata[,2] )

jtextor/tiltools documentation built on May 10, 2019, 1:17 p.m.