histogram [ <range> ] <function name>() ( <filename> | { <expression> } | { <vector obj> } ) [ every { <expression> } ] [ index <value> ] [ select <expression> ] [ using { <expression> } ] ( [ binwidth <value> ] [ binorigin <value> ] | [ bins (x1, x2, ...) ] )
The histogram command takes a single column of data from a file and produces a function that represents the frequency distribution of the supplied data values. The output function consists of a series of discrete intervals which we term bins. Within each interval the output function has a constant value, determined such that the area under each interval – i.e. the integral of the function over each interval – is equal to the number of datapoints found within that interval. The following simple example
histogram f() 'input.dat'
produces a frequency distribution of the data values found in the first column of the file input.dat, which it stores in the function f(x)
20.1
40.1
60.1
0.5
2.5
2.5
4.5
x=12
x=24