mmstat.baraxis {HKRbook} | R Documentation |
mmstat.baraxis
Description
Based on range
the position of the labels are determined and the axis is plotted.
Usage
mmstat.baraxis(side, range, at, labels, ...)
Arguments
side |
an integer specifying which side of the plot the axis is to be drawn on. The axis is placed as follows: 1=below, 2=left, 3=above and 4=right. |
range |
range: a data range |
at |
the points at which tick-marks are to be drawn. Non-finite
(infinite, |
labels |
this can either be a logical value specifying whether
(numerical) annotations are to be made at the tickmarks, or a
character or expression vector of labels to be placed at the
tickpoints. (Other objects are coerced by |
... |
further parameters to graphics::axis |
Value
adds a axis to a plot
Examples
oldpar <- par(mfrow=c(1,2))
x <- 0:15
px <- dbinom(x, 10, 0.5)
plot(x, px, type="h")
plot(x, px, type="h", axes=FALSE)
mmstat.baraxis(1, range(x), at=x, labels=as.character(x))
par(oldpar)