Interactive demo · Statistical Methods for Modern Biology · Chapter 3

45,101 points on one plot

Two single-cell microarrays (cell 59, primitive endoderm at E4.5, against cell 92, an FGF4 knock-out at E4.5) measure the same 45,101 probes. Drawn as points, the dense centre becomes a solid blob and hides how the data are distributed. Transparency, hexagonal binning (a two-dimensional histogram) and 2-D kernel density contours each trade detail in the dense part against visibility of the sparse outskirts. The MA view rotates the plot by 45° (A = mean, M = difference of the two log2 values); replacing A by its rank spreads the points evenly along the axis, which removes a visual artefact discussed in Section 3.11 of Holmes and Huber (2019).

Display

Coordinates

Scale (point display)

Point transparency α

Hexagon width (log2 units)

Density bandwidth h (kde2d convention)

Read-out

Try these

Hexagons use the lattice of geom_hex (hexbin): columns w apart, rows w√3/2 apart with every second row shifted by w/2, each point counted in the hexagon with the nearest centre. The density is MASS::kde2d on a 100 × 100 grid: a product of normal kernels with standard deviation h/4 in each direction (so h = 0.5 means a kernel standard deviation of 0.125). Contour levels are equally spaced.

In the lecture notes