Histogram-Mark
The histogram
mark is a convenient extension that combines a rectY mark with a binX transform. It accepts a list or array-like object of values and supports the various bin options such as thresholds
, interval
, domain
, and cumulative
as keyword arguments.
Here's a basic example:
histogram_data = [1, 2, 2, 3, 3, 3, 4, 4, 5]
Plot.histogram(histogram_data)
You can customize the number of bins:
Plot.histogram(histogram_data, thresholds=5)