View source: R/mmstat.baraxis.R
mmstat.baraxis | R Documentation |
Based on range
the position of the labels are determined and the axis is plotted.
mmstat.baraxis(side, range, at, labels, ...)
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 |
adds a axis to a plot
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.