PlotACC {s2dv}R Documentation

Plot Plumes/Timeseries Of Anomaly Correlation Coefficients

Description

Plots plumes/timeseries of ACC from an array with dimensions (output from ACC()):
c(nexp, nobs, nsdates, nltime, 4)
where the fourth dimension is of length 4 and contains the lower limit of the 95% confidence interval, the ACC, the upper limit of the 95% confidence interval and the 95% significance level given by a one-sided T-test.

Usage

PlotACC(
  ACC,
  sdates,
  toptitle = "",
  sizetit = 1,
  ytitle = "",
  limits = NULL,
  legends = NULL,
  freq = 12,
  biglab = FALSE,
  fill = FALSE,
  linezero = FALSE,
  points = TRUE,
  vlines = NULL,
  fileout = NULL,
  width = 8,
  height = 5,
  size_units = "in",
  res = 100,
  ...
)

Arguments

ACC

An ACC array with with dimensions:
c(nexp, nobs, nsdates, nltime, 4)
with the fourth dimension of length 4 containing the lower limit of the 95% confidence interval, the ACC, the upper limit of the 95% confidence interval and the 95% significance level.

sdates

A character vector of startdates: c('YYYYMMDD','YYYYMMDD').

toptitle

A character string of the main title, optional.

sizetit

A multiplicative factor to scale title size, optional.

ytitle

A character string of the title of Y-axis for each experiment: c(”, ”), optional.

limits

A numeric vector c(lower limit, upper limit): limits of the Y-axis, optional.

legends

A character vector of flags to be written in the legend, optional.

freq

A integer: 1 = yearly, 12 = monthly, 4 = seasonal, ... Default: 12.

biglab

A logical value for presentation/paper plot, Default = FALSE.

fill

A logical value if filled confidence interval. Default = FALSE.

linezero

A logical value if a line at y=0 should be added. Default = FALSE.

points

A logical value if points instead of lines. Default = TRUE.
Must be TRUE if only 1 leadtime.

vlines

A vector of x location where to add vertical black lines, optional.

fileout

A character string of the output file name. Extensions allowed: eps/ps, jpeg, png, pdf, bmp and tiff. Default is NULL.

width

A numeric of the file width, in the units specified in the parameter size_units (inches by default). Takes 8 by default.

height

A numeric of the file height, in the units specified in the parameter size_units (inches by default). Takes 5 by default.

size_units

A character string of the units of the size of the device (file or window) to plot in. Inches ('in') by default. See ?Devices and the creator function of the corresponding device.

res

Resolution of the device (file or window) to plot in. See ?Devices and the creator function of the corresponding device.

...

Arguments to be passed to the method. Only accepts the following graphical parameters:
adj ann ask bg bty cex.sub cin col.axis col.lab col.main col.sub cra crt csi cxy err family fg fig fin font font.axis font.lab font.main font.sub lend lheight ljoin lmitre mar mex mfcol mfrow mfg mkh oma omd omi page plt smo srt tck tcl usr xaxp xaxs xaxt xlog xpd yaxp yaxs yaxt ylbias ylog
For more information about the parameters see 'par'.

Examples

 
sampleData$mod <- Season(sampleData$mod, monini = 11, moninf = 12, monsup = 2)
sampleData$obs <- Season(sampleData$obs, monini = 11, moninf = 12, monsup = 2) 
clim <- Clim(sampleData$mod, sampleData$obs)
ano_exp <- Ano(sampleData$mod, clim$clim_exp)
ano_obs <- Ano(sampleData$obs, clim$clim_obs)
acc <- ACC(ano_exp, ano_obs, lat = sampleData$lat, dat_dim = 'dataset')
acc_bootstrap <- ACC(ano_exp, ano_obs, lat = sampleData$lat, conftype = 'bootstrap', 
                    dat_dim = 'dataset')
# Combine acc results for PlotACC
res <- array(c(acc$conf.lower, acc$acc, acc$conf.upper, acc$p.val), 
            dim = c(dim(acc$acc), 4))
res_bootstrap <- array(c(acc$acc_conf.lower, acc$acc, acc$acc_conf.upper, acc$p.val),
                      dim = c(dim(acc$acc), 4))
 
PlotACC(res, startDates)
PlotACC(res_bootstrap, startDates)
 

[Package s2dv version 2.0.0 Index]