plot.trendbreaker: Plotting method for trendbreaker objects

Description Usage Arguments Author(s)

View source: R/plot.R

Description

The plotting method for trendbreaker objects produces a ggplot object, which can then be modified using ggplot2. It accepts a few arguments for customising the graphs produced.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
## S3 method for class 'trendbreaker'
plot(
  x,
  x_axis = x$date_index,
  point_size = 2,
  col_normal = "#8B8B8C",
  col_increase = "#CB3355",
  col_decrease = "#32AB96",
  guide = TRUE,
  ...
)

## S3 method for class 'trendbreaker_incidence2'
plot(
  x,
  point_size = 2,
  col_normal = "#8B8B8C",
  col_increase = "#CB3355",
  col_decrease = "#32AB96",
  guide = TRUE,
  nrow = NULL,
  ncol = NULL,
  ...
)

Arguments

x

an trendbreaker object, as returned by asmodee

x_axis

the name or position of the variable in get_results(x) to be used on the x-axis, which represents time; defaults to the date provided when calling asmodee

point_size

the size of the points to be used; defaults to 2

col_normal

the color to be used for non-outlying observations, i.e. observations falling within the prediction interval of the estimated temporal trend

col_increase

the color to be used for outlying observations which are above the prediction interval of the estimated temporal trend

col_decrease

the color to be used for outlying observations which are below the prediction interval of the estimated temporal trend

guide

a logical indicating whether a color legend should be added to the plot (TRUE, default) or not (FALSE)

...

unused - present for compatibility with the plot generic

nrow

(for trendbreaker_incidence2 plots) the number of rows for the grid plot

ncol

(for trendbreaker_incidence2 plots) the number of columns for the grid plot

Author(s)

Thibaut Jombart


reconhub/epichange documentation built on April 28, 2021, 2 p.m.