PlotHistogram: Plot Histograms

Usage Arguments Functions Examples

Usage

1
2
3
4
5
6
PlotHistogram(data, col.f = blue.f, q1 = c(0.25, 0.75), q2 = c(0.05,
  0.95), textStagger = FALSE, digit = 2, ...)

PlotHistograms(lst, cols.f = blue.f, qs = vector(), xlim = NULL,
  ylim = NULL, legend = list(need = FALSE, location = "topleft", cex = 1),
  ...)

Arguments

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

Functions

Examples

 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))

einaooka/tea.eo.plots documentation built on May 16, 2019, 1:25 a.m.