[ top | up ]

Histograms

Syntax

hist(x, breaks, freq=TRUE, col=0, border=1, ...)

Arguments

x a vector of values for which the histogram is desired.
breaks either a single number giving the approximate number of cells for the histogram or a vector giving the breakpoints between histogram cells.
freq a logical vector which indicates whether the histogram is to present a representation of frequencies (the default) or relative frequencies.
col the colour to draw the bars. The default of 0 indicates that only an outline should be drawn.
border the color of border to be drawn around each bar. Specifying 0 indicates that no border should be drawn.
... graphical parameters can also be specified as arguments.

Description

hist computes and plots a histogram of the given data values. The histogram cells are intervals of the form [a,b), i.e. they include their left-hand endpoint, but not their right one.

Examples

hist(precipitation)