plot.sirspline: 'plot' method for sirspline-object

View source: R/S3_definitions.R

plot.sirsplineR Documentation

plot method for sirspline-object

Description

Plot SIR splines using R base graphics.

Usage

## S3 method for class 'sirspline'
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 are 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).

Value

Always returns 'NULL' invisibly. This function is called for its side effects.

Author(s)

Matti Rantanen

See Also

Other sir functions: lines.sirspline(), sir_exp(), sir_ratio(), sirspline(), sir()


popEpi documentation built on Aug. 23, 2023, 5:08 p.m.