Previous Up Next

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:

Example

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

With unsorted data:

Example

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

Previous Up Next