- x
A vector of values for which the histogram is desired.
- breaks
One of:
A vector giving the breakpoints between histogram cells,
A function to compute the vector of breakpoints,
A single number giving the number of cells for the histogram,
A character string naming an algorithm to compute the number of cells,
A function to compute the number of cells.
In the last three cases the number is a suggestion only; the breakpoints will be set to pretty
values. If breaks is a function, the x vector is supplied to it as the only argument.
- freq
Logical; if TRUE, the histogram graphic is a representation of frequencies, the counts component of the result; if FALSE, probability densities, component density, are plotted (so that the histogram has a total area of one). Defaults to TRUE if and only if breaks are equidistant (and probability is not specified).
- include.lowest
Logical; if TRUE, an x[i] equal to the breaks value will be included in the first (or last, for right = FALSE) bar. This will be ignored (with a warning) unless breaks is a vector.
- right
Logical; if TRUE, the histogram cells are right-closed (left open) intervals.
- density
The density of shading lines, in lines per inch. The default value of NULL means that no shading lines are drawn. Non-positive values of density also inhibit the drawing of shading lines.
- angle
The slope of shading lines, given as an angle in degrees (counter-clockwise).
- col
A colour to be used to fill the bars. The default of NULL yields unfilled bars.
- border
The color of the border around the bars. The default is to use the standard foreground color.
- xlim
Vector; range of x values to use for both counting and plotting. The default NULL will span the range of histogram breaks. If length equals 1 then the argument is taken to mean the sigma range to select for plotting and the clipping is done by magclip
. If this is set to 'auto' then the limits will be estimated from the data dynamically. See examples.
- ylim
Vector; range of y limits to show in the histogram plot.
- plot
Logical; draw the histogram (otherwise it just returns the count data).
- verbose
Logical; if TRUE and xlim is used then the followign is printed out: summary of the data selected, standard-deviation the 1/2-sigma implied quantiles, and number and fraction of displayed data. Note all numbers are computed for the logged values of the x input if log= x | xy | yx.
- add
Logical, if TRUE the histogram will be added to the current plot. Be careful to match log properties if adding, else the comparison will be of little use and hard to interpret.
- log
Log axis arguments to be passed to hist and plot. E.g. use 'x', 'y', 'xy' or 'yx' as appropriate. Default '' assumes no logging of any axes. If the x axis is logged then the histogram will be calculated in log-space.
- unlog
Determines if axis labels should be unlogged. E.g. use 'x', 'y', 'xy' or 'yx' as appropriate. See magaxis
.
- scale
Numeric scalar; an additional scaling parameter to apply to the frequnecy counts. This is useful if you want to get the y axis in to certain units, e.g. the counts represent objects in 10 square degrees of sky, so to get the y-axis into units of N/sq.deg you would set scale=1/10.
- cumsum
Logical; if FALSE (default) then counts and density are totals for the current bin (usual sense of a histogram), if TRUE then counts and density are cumulative totals of all counts up to and including the current bin (always from lowest x upwards).
- p.test
Function; optionally the user can provide a standard (or custom) p-test to be computed on the display (i.e. trimmed) data. This might be e.g. a Normality test with the shapiro.test
function etc. The results are printed to screen below the other standard summary information if verbose=TRUE.
- ...
Arguments to be parsed to magplot
.