mhist | R Documentation |
Draws a histogram using lines.
mhist(
x,
breaks = "Sturges",
measure = c("density", "counts"),
lwd = 3,
xlim = NULL,
ylim = NULL,
plot.axes = FALSE,
xaxis = TRUE,
yaxis = TRUE,
xaxis.line = 0,
yaxis.line = 0,
xlab = NULL,
ylab = measure,
xaxs = "r",
yaxs = "r",
box = FALSE,
grid = FALSE,
col = pennCol$lighterBlue,
horiz = FALSE,
main = "",
add = FALSE,
...
)
x |
Input vector |
breaks |
See |
measure |
Character: "density"(Default), "counts" |
lwd |
Float: Line width |
xlim |
Vector, length 2: x-axis limits |
ylim |
Vector, length 2: y-axis limits |
plot.axes |
Logical: If TRUE, draws plot axes. Separate from |
xaxis |
Logical: If TRUE, draws x-axis |
yaxis |
Logical: If TRUE, draws y-axis |
xaxis.line |
Float: Number of lines into the margin to position |
yaxis.line |
Float: Number of lines into the margin to position |
xlab |
Character: x-axis label |
ylab |
Character: y-axis label |
xaxs |
Character: 'r' (Default): Extends x-axis range by 4 percent at each end, 'i': Does not extend x-axis range |
yaxs |
Character: 'r' (Default): Extends y-axis range by 4 percent at each end, 'i': Does not extend y-axis range |
box |
Logical: If TRUE, draws a box around plot |
grid |
Logical: If TRUE, draws a grid |
col |
Color to use for histogram lines |
horiz |
Logical: If TRUE, switches x and y axes. Important: Provide all other arguments as if for a
non-rotated plot - i.e. |
main |
Character: Main title |
add |
Logical: If TRUE, add histogram to existing plot (Caution: make sure the axes line up!) |
... |
Additional arguments to be passed to |
Using horiz = TRUE
, you can draw vertical histograms (as used by mplot3_xym
)
E.D. Gennatas
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.