Histograms

### 18.1.10 Histograms

Given a list of intervals and a number of points in each interval, such as is given by the output of the classes command (see Section 18.1.9), a histogram is a graph consisting of a box over each interval, where the height of each box is proportional to the number of points and the total area of the boxes is 1. The histogram or histogramme command draws histograms. The data can be sorted or unsorted.

With sorted data:

- histogram takes L, a list whose elements lists of a range a..b and a positive integer.
- histogram(L) draws a histogram for the data.

#### Example

histogram([[1.5..1.65,50],[1.65..1.7,20],[1.7..1.8,30]])

With unsorted data:

- histogram takes one mandatory argument and two optional arguments.
  - L, a list of numbers.
  - Optionally, a and b, numbers.
- histogram(L ⟨,a,b⟩) returns the histogram for classes(L ⟨,a,b⟩) (see Section 18.1.9).

#### Example

histogram([1,2,2.5,2.5,3],0.5,0.75)