Plot a Histogram and a Boxplot
Creates a histogram and a horizontal boxplot on the current graphics device.
histBxp(x, nclass, breaks, probability=FALSE, include.lowest=TRUE, xlab = deparse(substitute(x)), ..., width=0.2, boxcol=3, medcol=2, medlwd=5, whisklty=2, staplelty=1)
x |
numeric vector of data for histogram. Missing values
( |
nclass |
recommendation for the number of classes (i.e., bars) the histogram should
have. The default is a number proportional to the logarithm of the length
of |
breaks |
vector of the break points for the bars of the histogram. The count in the
i-th bar is |
probability |
logical flag: if |
include.lowest |
If |
xlab |
character or expression for x axis labeling. |
... |
additional arguments to |
width |
width of the box relative to the height of the histogram. DEFAULT is
|
boxcol |
color of filled box. The default is |
medcol |
the color of the median line. The special value, |
medlwd |
median line width. The special value |
whisklty |
whisker line type. The special value |
staplelty |
staple (whisker end cap) line type. The special value Graphical parameters (see |
If include.lowest
is FALSE
the bottom breakpoint must be
strictly less than the minimum of the data, otherwise (the default) it
must be less than or equal to the minimum of the data. The top
breakpoint must be greater than or equal to the maximum of the data.
This function has been called hist.bxp()
for 17 years; in 2012,
the increasingly strong CRAN policies required a new name (which could not
be confused with an S3 method name).
S-Plus: Markus Keller, Christian Keller; port to R in 1990's: Martin Mächler.
lab <- "50 samples from a t distribution with 5 d.f." mult.fig(2*3, main = "Hist() + Rug() and histBxp(*)") for(i in 1:3) { my.sample <- rt(50, 5) hist(my.sample, main=lab); rug(my.sample)# for 50 obs., this is ok, too.. histBxp(my.sample, main=lab) }
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.