Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

PlotAno

Plot Raw Or Smoothed Anomalies


Description

Plots timeseries of raw or smoothed anomalies of any variable output from Load() or Ano() or or Ano_CrossValid() or Smoothing().

Usage

PlotAno(
  exp_ano,
  obs_ano = NULL,
  sdates,
  toptitle = rep("", 15),
  ytitle = rep("", 15),
  limits = NULL,
  legends = NULL,
  freq = 12,
  biglab = FALSE,
  fill = TRUE,
  memb = TRUE,
  ensmean = TRUE,
  linezero = FALSE,
  points = FALSE,
  vlines = NULL,
  sizetit = 1,
  fileout = paste0("output", 1:5, "_plotano.eps"),
  width = 8,
  height = 5,
  size_units = "in",
  res = 100,
  ...
)

Arguments

exp_ano

Array containing the experimental data:
c(nmod/nexp, nmemb/nparam, nsdates, nltime).

obs_ano

Optional matrix containing the observational data:
c(nobs, nmemb, nsdates, nltime)

sdates

List of starting dates: c('YYYYMMDD','YYYYMMDD').

toptitle

Main title for each experiment: c(”,”), optional.

ytitle

Title of Y-axis for each experiment: c(”,”), optional.

limits

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

legends

List of observational dataset names, optional.

freq

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

biglab

TRUE/FALSE for presentation/paper plot. Default = FALSE.

fill

TRUE/FALSE if the spread between members should be filled. Default = TRUE.

memb

TRUE/FALSE if all members/only the ensemble-mean should be plotted.
Default = TRUE.

ensmean

TRUE/FALSE if the ensemble-mean should be plotted. Default = TRUE.

linezero

TRUE/FALSE if a line at y=0 should be added. Default = FALSE.

points

TRUE/FALSE if points instead of lines should be shown. Default = FALSE.

vlines

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

sizetit

Multiplicative factor to scale title size, optional.

fileout

Name of the output file for each experiment: c(”,”). Extensions allowed: eps/ps, jpeg, png, pdf, bmp and tiff. If filenames with different extensions are passed, it will be considered only the first one and it will be extended to the rest.
Default = c('output1_plotano.eps', 'output2_plotano.eps', 'output3_plotano.eps', 'output4_plotano.eps', 'output5_plotano.eps')

width

File width, in the units specified in the parameter size_units (inches by default). Takes 8 by default.

height

File height, in the units specified in the parameter size_units (inches by default). Takes 5 by default.

size_units

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 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'.

Author(s)

History:
0.1 - 2011-03 (V. Guemas, virginie.guemas@ic3.cat) - Original code
1.0 - 2013-09 (N. Manubens, nicolau.manubens@ic3.cat) - Formatting to CRAN

Examples

# Load sample data as in Load() example:
example(Load)
clim <- Clim(sampleData$mod, sampleData$obs)
ano_exp <- Ano(sampleData$mod, clim$clim_exp)
ano_obs <- Ano(sampleData$obs, clim$clim_obs)
runmean_nb_months <- 12
dim_to_smooth <- 4  # Smooth along lead-times
smooth_ano_exp <- Smoothing(ano_exp, runmean_nb_months, dim_to_smooth)
smooth_ano_obs <- Smoothing(ano_obs, runmean_nb_months, dim_to_smooth)
 
PlotAno(smooth_ano_exp, smooth_ano_obs, startDates, 
       toptitle = paste('smoothed anomalies'), ytitle = c('K', 'K', 'K'), 
       legends = 'ERSST', biglab = FALSE, fileout = 'tos_ano.eps')

s2dverification

Set of Common Tools for Forecast Verification

v2.10.0
Apache License 2.0
Authors
BSC-CNS [aut, cph], Virginie Guemas [aut], Nicolau Manubens [aut], An-Chi Ho [ctb, cre], Nuria Perez-Zanon [ctb], Javier Garcia-Serrano [aut], Neven Fuckar [aut], Louis-Philippe Caron [aut], Omar Bellprat [aut], Luis Rodrigues [aut], Veronica Torralba [aut], Alasdair Hunter [aut], Chloe Prodhomme [aut], Martin Menegoz [aut], Domingo Manubens [ctb], Constantin Ardilouze [ctb], Lauriane Batte [ctb], Fabian Lienert [ctb], Julia Giner [ctb], Jean-Philippe Baudouin [ctb], Nube Gonzalez [ctb], Ludovic Auger [ctb], Nicola Cortesi [ctb], Eleftheria Exarchou [ctb], Ruben Cruz [ctb], Isabel Andreu-Burillo [ctb], Ramiro Saurral [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.