Usage Arguments Functions Examples
1 2 3 4 5 6 |
col.f |
A colar function with transparency index. |
q1 |
An array of quantiles. Default set at c(0.25, 0.75). |
q2 |
An array of quantiles. Default set at c(0.05, 0.95). |
textStagger |
Binary. Default set at FALSE. |
lst |
A list of data series. |
cols.f |
A list of colar functions with transparency index. The length needs to match that of lst. |
qs |
An array of quantiles for multiple histograms. Defalt set at NULL. |
legend |
A list of (need, location, cex). |
x |
A data array. |
br |
Number of histogram breaks |
PlotHistograms
: Plot multiple histograms together
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # A histogram
x <- rnorm(1000, 3,1)
PlotHistogram(x, green.f)
PlotHistogram(x, blue.f, textStagger=TRUE)
# A histogram for large values
x <- rnorm(1000, 10000,1000)
PlotHistogram(x, red.f, q1 = c(0.2, 0.8), q2 = c(0.1, 0.9), textStagger=TRUE, xlab="x")
# Multiple histograms together
x1 <- rnorm(1000, 3,1)
x2 <- rnorm(1000, 5,1)
x3 <- rnorm(1000, -3,1)
PlotHistograms(list("x1"=x1, "x2"=x2), cols.f = list(red.f, blue.f), qs=c(0.05, 0.95))
PlotHistograms(list("x1"=x1, "x2"=x2, "x3"=x3), cols.f = list(red.f, blue.f, green.f)
, legend=list(need = TRUE, location="topleft", cex=1.2))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.