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, ...)
Input vector
See hist("breaks")
Default = "Sturges"
String: "density"(Default), "counts"
Float: Line width
Vector, length 2: x-axis limits
Vector, length 2: y-axis limits
Logical: If TRUE, draws plot axes. Separate from xaxis
and yaxis
Logical: If TRUE, draws x-axis
Logical: If TRUE, draws y-axis
Float: Number of lines into the margin to position xaxis
. See axis("line")
Float: Number of lines into the margin to position yaxis
. See axis("line")
String: x-axis label
String: y-axis label
String: 'r' (Default): Extends x-axis range by 4 percent at each end, 'i': Does not extend x-axis range
String: 'r' (Default): Extends y-axis range by 4 percent at each end, 'i': Does not extend y-axis range
Logical: If TRUE, draws a box around plot
Logical: If TRUE, draws a grid
Color to use for histogram lines
Logical: If TRUE, switches x and y axes. Important: Provide all other arguments as if for a
non-rotated plot - i.e. xlab
will become the y-axis label
String: Main title
Logical: If TRUE, add histogram to existing plot (Caution: make sure the axes line up!)
Additional arguments to be passed to graphics::plot
Using horiz = TRUE
, you can draw vertical histograms (as used by mplot3.xym
)