Learn R Programming

SCBmeanfd (version 1.1)

plot.SCBand: Plot a SCBand Object

Description

plot method for class "SCBand".

Usage

"plot"(x , y = NULL, xlim = NULL, ylim = NULL, main = NULL, xlab = NULL, ylab = NULL, col = NULL, cex = NULL, pch = NULL, lty = NULL, lwd = NULL, legend = TRUE, where = NULL, text = NULL, legend.cex = NULL, horiz = TRUE, bty = "n", ...)

Arguments

x
a SCBand object, typically result of a call to scb.mean, scb.model, or scb.equal.
y
optional y data.
xlim
the x limits (x1, x2) of the plot.
ylim
the y limits of the plot.
main
an overall title for the plot.
xlab
a title for the x axis.
ylab
a title for the y axis.
col
the colors for lines and points.
cex
a numerical vector giving the amount by which plotting characters and symbols should be scaled relative to the default.
pch
a vector of plotting characters or symbols: see points.
lty
a vector of line types, see par.
lwd
a vector of line widths, see par.
legend
logical; if TRUE, a legend is added to the plot.
where
a character vector indicating the legend location: "bottomright", "bottom", "bottomleft", "left", "topleft", "top", "topright", "right" or "center".
text
a character vector to appear in the legend.
legend.cex
character expansion factor relative to current par("cex") for the legend.
horiz
logical; if TRUE, the legend is displayed horizontally rather than vertically.
bty
the type of box to be drawn around the legend. The allowed values are "n" (the default) and "o".
...
additional arguments passed to the function matplot for displaying the y data.

Details

The argument y can be used to plot subsets of the y data. If non null, this argument has priority over the component x$y for plotting.

The graphical parameters col, cex, pch, lty, and lwd apply to the following components to be plotted: data, parametric estimate, nonparametric estimate(s), normal simultaneous confidence bands (SCB), and bootstrap SCB. More precisely, cex and pch must be specified as vectors of length equal to the number of $y$ data sets to be plotted (0, 1, or 2); lty and lwd must specified as numeric vectors of length equal to the total number of estimates and SCB components; col applies to all components and should be specified accordingly. If necessary, graphical parameters are recycled to match the required length.

By default a legend is plotted horizontally at the bottom of the graph.

Examples

Run this code
## Not run: 
# ## Plasma citrate data 
# time <- 8:21
# data(plasma)
# h <- cv.select(time, plasma, degree = 1, interval = c(.5, 1))
# scbplasma <- scb.mean(time, plasma, bandwidth = h, scbtype = "both",
#                       gridsize = 100)
# plot(scbplasma, cex = .2, legend.cex = .85, xlab = "Time of day", 
#      ylab = "Concentration", main = "Plasma citrate data")
# ## End(Not run)

Run the code above in your browser using DataLab