Produces an histogram of univariate ILR data (see Filzmoser et al., 2009).
Usage
# S4 method for CompositionMatrix
hist(
x,
...,
freq = FALSE,
ncol = NULL,
flip = FALSE,
main = NULL,
sub = NULL,
ann = graphics::par("ann"),
axes = TRUE,
frame.plot = axes
)
Arguments
- x
A
CompositionMatrix
object.- ...
Further parameters to be passed to
graphics::hist()
.- freq
A
logical
scalar: should absolute frequencies (counts) be displayed (seegraphics::hist()
)?- ncol
An
integer
specifying the number of columns to use whenfacet
is "multiple
". Defaults to 1 for up to 4 series, otherwise to 2.- flip
A
logical
scalar: should the y-axis (ticks and numbering) be flipped from side 2 (left) to 4 (right) from variable to variable?- main
A
character
string giving a main title for the plot.- sub
A
character
string giving a subtitle for the plot.- ann
A
logical
scalar: should the default annotation (title and x and y axis labels) appear on the plot?- axes
A
logical
scalar: should axes be drawn on the plot?- frame.plot
A
logical
scalar: should a box be drawn around the plot?
Value
hist()
is called for its side-effects: is results in a graphic being
displayed (invisibly return x
).
References
Filzmoser, P., Hron, K. & Reimann, C. (2009). Univariate Statistical Analysis of Environmental (Compositional) Data: Problems and Possibilities. Science of The Total Environment, 407(23): 6100-6108. doi:10.1016/j.scitotenv.2009.08.008 .
See also
Other plot methods:
as_graph()
,
barplot()
,
plot()
,
plot_logratio
Examples
## Data from Aitchison 1986
data("hongite")
## Coerce to compositional data
coda <- as_composition(hongite)
## Boxplot plot
hist(coda)
hist(coda)
hist(coda[, 1, drop = FALSE])