Skip to contents

Plotting a (multivariate) disProg object (soft-deprecated).

As of surveillance 1.20.0, legacy disProg objects are plotted via internal disProg2sts conversion and stsplot_time.

Usage

# S3 method for disProg
plot(x, title = "", xaxis.years=TRUE, startyear = x$start[1],
    firstweek = x$start[2], as.one=TRUE, same.scale=TRUE, ...)

Arguments

x

object of class disProg

title

plot title

xaxis.years

if TRUE, the x axis is labeled using years

startyear,firstweek

(legacy arguments, ignored with a warning)

as.one

if TRUE all individual time series are shown in one plot

same.scale

if TRUE all plots have same scale

...

further arguments passed to stsplot_time

Examples

# Plotting of simulated data
disProgObj <- sim.pointSource(p = 0.99, r = 0.5, length = 208,
                              A = 1, alpha = 1, beta = 0, phi = 0,
                              frequency = 1, state = NULL, K = 5)
plot(disProgObj)
title <- "Infection Counts and Defined Outbreaks for Simulated Data"
plot(disProgObj, title = title)
plot(disProgObj, title = title, xaxis.years = FALSE)

# Plotting of measles data
data(measles.weser)
# one plot
plot(measles.weser, title = "measles cases in the district Weser-Ems")
# plot cases for each "Kreis" 
plot(measles.weser, as.one = FALSE)
plot(measles.weser, as.one = FALSE, same.scale = FALSE)