Learn R Programming

popEpi (version 0.3.1)

plot.sirspline: plot method for sirspline-object

Description

Plot SIR splines using R base graphics.

Usage

"plot"(x, conf.int = TRUE, abline = TRUE, log = FALSE, type, ylab, xlab, ...)

Arguments

x
an object returned by function sirspline
conf.int
logical; default TRUE draws also the 95 confidence intervals
abline
logical; draws a reference line where SIR = 1
log
logical; default FALSE. Should the y-axis be in log scale
type
select type = 'n' to plot only figure frames
ylab
overwrites default y-axis label; can be a vector if multiple splines fitted
xlab
overwrites default x-axis label; can be a vector if multiple splines fitted
...
arguments passed on to plot()

Details

In plot.sirspline almost every graphical parameter is user adjustable, such as ylim, xlim. plot.sirsplines calls lines.splines to add lines.

The plot axis without lines can be plotted using option type = 'n'. On top of the frame it's then possible to add a grid, abline or text before plotting the lines (see: sirspline).

See Also

sir, sirspline, lines.sirspline