plot.SCBand: Plot a SCBand Object

Description Usage Arguments Details Examples

View source: R/plot.SCBand.R

Description

plot method for class "SCBand".

Usage

1
2
3
4
5
## S3 method for class 'SCBand'
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

SCBand object, typically result of a call to scb.mean, scb.model, or scb.equal.

y

optional y data.

xlim

x limits of the plot (numeric vector of length 2).

ylim

y limits of the plot (numeric vector of length 2).

main

title of the plot.

xlab

label of the x axis.

ylab

label of the y axis.

col

colors for lines and points.

cex

scale of plotting characters and symbols relative to default (numerical vector).

pch

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

legend location: "bottomright", "bottom", "bottomleft", "left", "topleft", "top", "topright", "right" or "center".

text

text of the legend (character vector).

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

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## 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)

Example output



SCBmeanfd documentation built on May 2, 2019, 4:19 a.m.