multiHist | R Documentation |
Creates a stacked histogram (as opposed to side-by-side or overlapping) for categorical data
multiHist(data, y, group, breaks, col = NULL, axisStep = 1, xlimit = NULL, logAxis = F, axisLim = NULL, ...)
data |
is a data.frame or data.table containing the data |
y |
is the variable to be plotted as a histogram as a quoted name |
group |
is the quoted name of the grouping variable |
breaks |
is a vector of breaks for the histogram |
col |
is an optional specification of the colors to be used in order of unique(group) |
axisStep |
is the spacing of x-axis labels |
A stacked histogram color coded by the provided factor
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.