PlotStackedArea: Area Plot

Description Usage Arguments Examples

Description

Plot area plots. For one y variable, use either PlotArea or FillArea. For number of y variables, use PlotStackedArea.

Usage

1
2
PlotStackedArea(x, ys, cols = c(NA, NA), legend = list(need = FALSE,
  location = "topleft", cex = 1), ...)

Arguments

x

An array of x variable.

legend

A list of (need, location, cex).

y(s)

An array or matrix of y variables.

col(s)

An array of color. Its length has to match the number of y variables.

add

A binary.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
niter <- 10
df <- data.frame("Date"=rep(seq(as.Date("2010-1-1"), by="month", length.out = 12),niter)
, "Iter" = rep(1:niter,each=12), "Y"=rnorm(12*niter,10,2))
df <- cast(df, Date ~ Iter, value="Y")

PlotArea(df[,1], df[,2], col=green.f(0.5), xlab="x", ylab="y")
FillArea(df[,1], df[,2]/2, col=orange.f(1))

PlotStackedArea(df[,1], df[,2:5])
PlotStackedArea(df[,1], df[,2:3], col=rainbow.f(c(2,8),1))
PlotStackedArea(df[,1], df[,2:10], legend=list(need = TRUE, location="topleft", cex=1)
, xlab="month", ylab="random variable")

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