HistogramList
✖
HistogramList
gives a list of bins and histogram heights of the values {xi,yi,…}.
gives a list of bins and histogram heights with bin heights computed according to the specification hspec.
Details and Options



- HistogramList is also known as quadrat counts.
- HistogramList produces a list of bin delimiters {b1,b2,…} for each dimension and a depth-
array of values for each bin.
- For 2D data, the output has the form {{{bx1,bx2,…},{by1,…}},{{v1,1,v1,2,…},{v2,1,…},…}} where vi,j is the value corresponding to the bin [bxi,bxi+1)×[byj,byj+1).
- HistogramList[data] by default gives equal bins chosen to approximate an assumed underlying smooth distribution of the values {xi,yi,…}.
- The
width of each bin is computed according to the values xi, the
width according to the yi, etc.
- The following bin specifications bpsec can be given:
-
n use n bins {w} use bins of width w {min,max,w} use bins of width w from min to max {{b1,b2,…}} use bins [b1,b2),[b2,b3),… Automatic determine bin widths automatically "name" use a named binning method {"Log",bspec} apply binning bspec on log-transformed data fw apply fw to get an explicit bin specification {b1,b2,…} {xspec,yspec,…} give different x, y, etc. specifications - The binning specification "Log" is taken to use the Automatic underlying binning method.
- Possible named binning methods include:
-
"Sturges" compute the number of bins based on the length of data "Scott" asymptotically minimize the mean square error "FreedmanDiaconis" twice the interquartile range divided by the cube root of sample size "Knuth" balance likelihood and prior probability of a piecewise uniform model "Wand" one-level recursive approximate Wand binning - The function fb in HistogramList[data,fb] is applied to a list of all {xi,yi,…}, and should return an explicit bin list {{bx1,bx2,…},{by1,by2,…},…}. In HistogramList[data,{fx,fy,…}], fx is applied to the list of xi, and fy to the list of yi, etc.
- Different forms of histogram data can be obtained by giving different bin height specifications hspec in HistogramList[data,bspec,hspec]. The following forms can be used:
-
"Count" the number of values lying in each bin "CumulativeCount" cumulative counts "SurvivalCount" survival counts "Probability" fraction of values lying in each bin "PDF" probability density function "CDF" cumulative distribution function "SF" survival function "HF" hazard function "CHF" cumulative hazard function fh heights obtained by applying fh to bins and counts - Only values {xi,yi,…} that consist of real numbers are assigned to bins; others are taken to be missing.
- The function fh in HistogramList[data,bspec,fh] is applied to two arguments: a list of bin delimiters {{bx1,bx2,…},{by1,by2,…},…} and for
-dimensional data an array of depth
with counts for each bin.
Examples
open allclose allBasic Examples (4)Summary of the most common use cases
Generate a list of bin delimiters and counts for a dataset:

https://wolfram.com/xid/0dc26n1gvnwa-vhwcy8

Generate a list of bin delimiters and counts for a bivariate dataset:

https://wolfram.com/xid/0dc26n1gvnwa-rvz604


https://wolfram.com/xid/0dc26n1gvnwa-g8bszr

Use different height functions:

https://wolfram.com/xid/0dc26n1gvnwa-tyzzu0

https://wolfram.com/xid/0dc26n1gvnwa-6r9vba


https://wolfram.com/xid/0dc26n1gvnwa-38iqvl


https://wolfram.com/xid/0dc26n1gvnwa-vmxffw

Scope (10)Survey of the scope of standard use cases
Bin Specifications (7)
Specify the number of bins to use:

https://wolfram.com/xid/0dc26n1gvnwa-bnll24

https://wolfram.com/xid/0dc26n1gvnwa-fu5ydu


https://wolfram.com/xid/0dc26n1gvnwa-jhaknu


https://wolfram.com/xid/0dc26n1gvnwa-cseaq8


https://wolfram.com/xid/0dc26n1gvnwa-bczne

Bins for discrete values are centered on the values when possible:

https://wolfram.com/xid/0dc26n1gvnwa-fwau0w

Specify the number of bins to use for each dimension:

https://wolfram.com/xid/0dc26n1gvnwa-xzyje7

https://wolfram.com/xid/0dc26n1gvnwa-2fz6vi

Specify different bin specifications for each dimension:

https://wolfram.com/xid/0dc26n1gvnwa-ig2hij

https://wolfram.com/xid/0dc26n1gvnwa-meo6go

Use different named binning methods:

https://wolfram.com/xid/0dc26n1gvnwa-dqt52g

https://wolfram.com/xid/0dc26n1gvnwa-m72bmm

Use logarithmically spaced bins:

https://wolfram.com/xid/0dc26n1gvnwa-oews3c

https://wolfram.com/xid/0dc26n1gvnwa-gnf3tc

Delimit bins on integer boundaries using a binning function:

https://wolfram.com/xid/0dc26n1gvnwa-e8jw76

https://wolfram.com/xid/0dc26n1gvnwa-gkihwi


https://wolfram.com/xid/0dc26n1gvnwa-bzo34f

Height Specifications (3)
Use different height specifications:

https://wolfram.com/xid/0dc26n1gvnwa-cphhlw

https://wolfram.com/xid/0dc26n1gvnwa-2aqgi8

Use a height function that accumulates the bin counts:

https://wolfram.com/xid/0dc26n1gvnwa-o40mc5

https://wolfram.com/xid/0dc26n1gvnwa-ki7l92

https://wolfram.com/xid/0dc26n1gvnwa-jaap33

Nonreal data is taken to be missing:

https://wolfram.com/xid/0dc26n1gvnwa-bibvmw


https://wolfram.com/xid/0dc26n1gvnwa-4jj9vl

Properties & Relations (5)Properties of the function, and connections to other functions
Functions such as Histogram and Histogram3D use HistogramList to compute bins and heights:

https://wolfram.com/xid/0dc26n1gvnwa-t3lyka

https://wolfram.com/xid/0dc26n1gvnwa-fvzvxu

BinCounts and BinLists can be used to find items in specific bins:

https://wolfram.com/xid/0dc26n1gvnwa-5d8nnf

https://wolfram.com/xid/0dc26n1gvnwa-4xgmnu


https://wolfram.com/xid/0dc26n1gvnwa-ursv17

HistogramList also provides the actual bins:

https://wolfram.com/xid/0dc26n1gvnwa-kzcczf

Bivariate data is given as a list of pairs of numbers:

https://wolfram.com/xid/0dc26n1gvnwa-s7e1rf

There is one set of bins for each variable dimension:

https://wolfram.com/xid/0dc26n1gvnwa-bb175j

The array depth of the counts is the same as the number of variable dimensions:

https://wolfram.com/xid/0dc26n1gvnwa-s42tky

With data consisting of 5-tuples:

https://wolfram.com/xid/0dc26n1gvnwa-w0xdfm

https://wolfram.com/xid/0dc26n1gvnwa-l52900

For bin delimiters, there are
bins in each dimension:

https://wolfram.com/xid/0dc26n1gvnwa-n12g2

https://wolfram.com/xid/0dc26n1gvnwa-mksmny

HistogramList ignores the times if the input is TimeSeries:

https://wolfram.com/xid/0dc26n1gvnwa-8pf3w2

https://wolfram.com/xid/0dc26n1gvnwa-fh030f

Compare to the histogram distribution of the values:

https://wolfram.com/xid/0dc26n1gvnwa-vy8bf1


https://wolfram.com/xid/0dc26n1gvnwa-60bp7w

Possible Issues (4)Common pitfalls and unexpected behavior
Bins include the left endpoint, but not the right, which can result in unexpected bins:

https://wolfram.com/xid/0dc26n1gvnwa-4uturq

https://wolfram.com/xid/0dc26n1gvnwa-fj26av

The value 1 is not included in this histogram because it would be in the bin [1,1.2):

https://wolfram.com/xid/0dc26n1gvnwa-mm1op8


https://wolfram.com/xid/0dc26n1gvnwa-x8gyp7

The bins obtained using the specification {min,max,w} may not include all data points:

https://wolfram.com/xid/0dc26n1gvnwa-ijov4e

https://wolfram.com/xid/0dc26n1gvnwa-swfvbx


https://wolfram.com/xid/0dc26n1gvnwa-n7b6us

Specify the min and max so all data points are included in the bin covering:

https://wolfram.com/xid/0dc26n1gvnwa-lv5ut2

https://wolfram.com/xid/0dc26n1gvnwa-42jqa4


https://wolfram.com/xid/0dc26n1gvnwa-xcrjii

Alternatively, use the width-only bin specification {w}:

https://wolfram.com/xid/0dc26n1gvnwa-45gh2w


https://wolfram.com/xid/0dc26n1gvnwa-qbvho6

Results for multidimensional data can get quite large:

https://wolfram.com/xid/0dc26n1gvnwa-vkyh3e


https://wolfram.com/xid/0dc26n1gvnwa-r9h3gt

HistogramList does not recognize the path structure of multipath TemporalData input:

https://wolfram.com/xid/0dc26n1gvnwa-v4xauw

https://wolfram.com/xid/0dc26n1gvnwa-fssoy6



Find HistogramList pathwise:

https://wolfram.com/xid/0dc26n1gvnwa-v83h2w

Wolfram Research (2010), HistogramList, Wolfram Language function, https://reference.wolfram.com/language/ref/HistogramList.html.
Text
Wolfram Research (2010), HistogramList, Wolfram Language function, https://reference.wolfram.com/language/ref/HistogramList.html.
Wolfram Research (2010), HistogramList, Wolfram Language function, https://reference.wolfram.com/language/ref/HistogramList.html.
CMS
Wolfram Language. 2010. "HistogramList." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/HistogramList.html.
Wolfram Language. 2010. "HistogramList." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/HistogramList.html.
APA
Wolfram Language. (2010). HistogramList. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/HistogramList.html
Wolfram Language. (2010). HistogramList. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/HistogramList.html
BibTeX
@misc{reference.wolfram_2025_histogramlist, author="Wolfram Research", title="{HistogramList}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/HistogramList.html}", note=[Accessed: 26-March-2025
]}
BibLaTeX
@online{reference.wolfram_2025_histogramlist, organization={Wolfram Research}, title={HistogramList}, year={2010}, url={https://reference.wolfram.com/language/ref/HistogramList.html}, note=[Accessed: 26-March-2025
]}