histogram

Edit pageLast modified: 15 July 2024

The histogram adds a histogram layer function optionally creates a new context with bars aesthetics and new dataset which contains the "bin" statistic calculated on sample of a single numeric variable x. In this context, all required aesthetics are assigned by default but can be overridden.

A histogram is a statistical chart that serves to visually approximate the distribution of a numerical variable. It's a bar plot where each bar is representing a bin: its x coordinate is corresponding to bin range and y to count.