Description Usage Arguments Author(s) See Also Examples
Create histograms and hollow histograms. This function permits easy color and appearance customization.
1 2 3 4 5 6 7 |
x |
Numerical vector or a frequency table (matrix) where the first column represents the observed values and the second column the frequencies. See also |
col |
Shading of the histogram bins. |
border |
Color of histogram bin borders. |
breaks |
A vector for the bin boundaries or an approximate number of bins. |
probability |
If |
hollow |
If |
add |
If |
lty |
Line type. Applies only if |
lwd |
Line width. Applies only if |
freqTable |
Set to |
right |
Set to |
axes |
If |
xlab |
Label for the x axis. |
ylab |
Label for the y axis. |
xlim |
Limits for the x axis. |
ylim |
Limits for the y axis. |
... |
Additional arguments to |
David Diez
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | data(run10)
par(mfrow=c(2,2))
histPlot(run10$time)
histPlot(run10$time[run10$gender=='M'], probability=TRUE, xlim=c(30, 180),
ylim=c(0, 0.025), hollow=TRUE)
histPlot(run10$time[run10$gender=='F'], probability=TRUE, add=TRUE,
hollow=TRUE, lty=3, border='red')
legend('topleft', col=c('black', 'red'), lty=2:3, legend=c('M','F'))
histPlot(run10$time, col=fadeColor('yellow', '33'), border='darkblue',
probability=TRUE, breaks=30, lwd=3)
brks <- c(40, 50, 60, 65, 70, 75, 80, seq(82.5, 120, 2.5), 125,
130, 135, 140, 150, 160, 180)
histPlot(run10$time, probability=TRUE, breaks=brks,
col=fadeColor('darkgoldenrod4', '33'))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.