overlayBarplots | R Documentation |
Plots two histograms as densities by overlaying two barplots.
overlayBarplots(
x1,
x2,
nbBins,
leg1,
leg2,
cols = c(rgb(0, 0, 1, 1/4), rgb(1, 0, 0, 1/4)),
main = "",
xlab = "",
ylab = ""
)
x1 |
numeric vector for the first histogram |
x2 |
numeric vector for the second histogram |
nbBins |
number of bins; will be the same for both histograms |
leg1 |
legend for the first histogram |
leg2 |
legend for the second histogram |
cols |
vector of colors, one per histogram |
main |
main title |
xlab |
label of the x-axis |
ylab |
label of the y-axis |
nothing
Timothee Flutre
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.