plot.fd {rainbow}R Documentation

Plot functional objects

Description

Plot functional curves.

Usage

## S3 method for class 'fd':
plot(x, plot.type = c("functions", "time", "depth", "density"),
 labels = NULL, label.cex = 0.7, col = NULL, type = "l", lty = 1,
  xlab = x$xname, ylab = x$yname, pch = c(1:9,0, letters, LETTERS), ...)
## S3 method for class 'fd':
lines(x, plot.type = c("functions", "time", "depth", "density"), index,
 labels = NULL, label.cex = 0.7, col = NULL, lty = 1, ...)
## S3 method for class 'fd':
points(x, plot.type = c("functions", "time", "depth", "density"), index,
 labels = NULL, label.cex = 0.7, col = NULL, pch = 1, ...)

Arguments

x An object of class fd or fts.
plot.type Type of plot. See details for more explanations.
index Indices of curves. When lines.fd and points.fd are called, index allows users to specify which curve or curves are plotted. For instance, when index=2, the second curve ordered by time or depth or density is plotted.
labels Character vector of length length(y$x). If plot.type="time" then the labels are printed beside each time plot.
label.cex Character size for labels.
col Colors to use in plot. Default is to use a rainbow color palette with the number of colors equal to the number of functions.
type 1-character string giving the type of plot desired.
lty The line type.
xlab A title for x axis.
ylab A title for y axis.
pch Either an integer specifying a symbol or a single character to be used as the default in plotting points.
... Other plotting parameters passed to par.

Details

If plot.type="functions", then functions are plotted using a rainbow color palette so the first few functions are shown in red, followed by orange, yellow, green, blue and indigo with the last few functions plotted in violet.

If plot.type="time", then each value of x is shown as a separate time series in a time plot.

If plot.type="depth", then functions are first ordered by depth and then plotted using a rainbow color palette.

If plot.type="density", then functions are first ordered by density and then plotted using a rainbow color palette.

Value

Function produces a plot.

Author(s)

Rob J Hyndman, Han Lin Shang

References

R. J. Hyndman and H. L. Shang. (2008) "Rainbow plots, bagplots, and boxplots for functional data", Tech. rep. Department of Econometrics & Business Statistics, Monash University, November 2008, http://www.buseco.monash.edu.au/depts/ebs/pubs/wpapers/2008/9-08.php.

See Also

fd

Examples

plot(x = ElNino, plot.type = "time")
plot(x = ElNino, plot.type = "depth")
plot(x = ElNino, plot.type = "density")
plot(x = ElNino, plot.type = "functions")
lines(x = ElNino, plot.type = "functions", index = 3)
points(x = ElNino, plot.type = "functions", index = 3)

[Package rainbow version 1.1 Index]