norm.plot: Plot mean Cropper values and pointer years

Description Usage Arguments Details Value Author(s) Examples

View source: R/norm.plot.R

Description

The function creates a bar plot of mean Cropper values from a list of the type as produced by pointer.norm and highlights years identified as pointer years.

Usage

1
2
norm.plot(list.name, start.yr = NULL, end.yr = NULL, 
          sd.disp = FALSE, x.tick.major = 10, x.tick.minor = 5)

Arguments

list.name

a list as produced by pointer.norm

start.yr

an integer specifying the first year to be plotted. Defaults to the first year included in the out component of the list if start.yr is NULL.

end.yr

an integer specifying the last year to be plotted. Defaults to the last year included in the out component of the list if end.yr is NULL.

sd.disp

a logical specifying whether error bars (stdev) should be displayed. Defaults to FALSE.

x.tick.major

an integer controlling the major x-axis tick labels. Defaults to 10 years.

x.tick.minor

an integer controlling the minor x-axis ticks. Defaults to 5 years.

Details

The function makes a plot showing mean Cropper values; pointer years are indicated with dark-gray bars. If event years were defined using method.thresh "Neuwirth" (pointer.norm), different tones of gray indicate weak, strong and extreme pointer years, based on the most common event year class. Error bars can be set.

Value

Bar plot.

Author(s)

Marieke van der Maaten-Theunissen and Ernst van der Maaten.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Plot mean Cropper values and pointer years (method "Cropper")
data(s033)
py_c <- pointer.norm(s033, window = 5, method.thresh = "Cropper", 
                     series.thresh = 75)
norm.plot(py_c, start.yr = 1950, end.yr = NULL, 
          sd.disp = FALSE, x.tick.major = 10, x.tick.minor = 5)

## Plot mean Cropper values and pointer years (method "Neuwirth")
data(s033)
py_n <- pointer.norm(s033, window = 5, method.thresh = "Neuwirth",
                     series.thresh = 75)
norm.plot(py_n, start.yr = 1950, end.yr = NULL, 
          sd.disp = FALSE, x.tick.major = 10, x.tick.minor = 5)
          

Example output

Loading required package: ggplot2

pointRes documentation built on May 1, 2019, 8:45 p.m.