Skip to contents

StatSquareplot is ggplot2::StatBin: binwidth, bins, center, boundary, closed, breaks and pad all mean exactly what they mean on a histogram, because they are the histogram's own code. GeomSquareplot re-expands each bin into one rectangle per observation. Pair the two in a ggplot2::layer() to put countable squares in a plot you are assembling yourself.

Usage

StatSquareplot

Format

A ggplot2::Stat object.

Details

The one difference from a plain histogram is the binwidth chosen when the call names no grid at all: integer-valued data over a small range gets one bin per integer, rather than stat_bin's bins = 30 default, because thirty slivers is the wrong advice for a plot whose point is countability.

See also

gf_squareplot(), which pairs this stat and geom for you.