Description Usage Arguments Examples
Plot area plots. For one y variable, use either PlotArea or FillArea. For number of y variables, use PlotStackedArea.
1 2 |
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. |
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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.