plotAnnualCycle: Plots the annual cycle

Description Usage Arguments Author(s) Examples

View source: R/PlotFunctions.R

Description

plotAnnualCycle plots the monthly or seasonal annual cycle of indicated models and the box-whisker plots of the underlying distribution.

This plotting routine extracts all the information from the input data frame which has to be 'WUX-style' (see models2wux).

Usage

1
2
3
4
5
plotAnnualCycle(datain.df, var.name = NULL, subreg.subset = NULL,
season.subset = NULL, plot.quantiles = NULL, quantile.method = 7,
mark.df = NULL, plot.legend = FALSE, cex.names = 1.2, cex.lab = 1.2,
ylab = NULL, main = NULL, out.file.directory = NULL, out.file.name =
NULL, copyright = FALSE, ...)

Arguments

datain.df

WUX data frame obtained from models2wux.

var.name

Character string of parameter in WUX dataset.

subreg.subset

Vector of subregions to be plotted (e.g. c("EU.ENS", "GAR")).

season.subset

Vector of seasons to be plotted (e.g. c("MAM", "DJF")).

plot.quantiles

5 element vector indictaing the quantiles to be plotted (e.g. c(0.02,0.25,0.5,0.75,0.98)).

quantile.method

An integer between 1 and 9 selecting one of the nine quantile types in quantiles with default 7.

mark.df

Subset of WUX data frame indicating the models to be marked.

plot.legend

Boolean. Indicating if a plot legend indicating the models of mark.df and sample size should be plotted. Default is FALSE.

cex.names

Expansion factor for numeric axis labels in bxp. Default is 1.2.

cex.lab

Expansion factor for axis names (bar labels) in bxp. Default is 1.2.

ylab

Label for y-axis.

main

Main title.

out.file.directory

String of the directory where the plots are exported (e.g. "/tmp/plots/").

out.file.name

Prefix of the file names of the plots. Files will be stored as out.file.name_subreg_season.eps, where subreg is one realization of the subreg.subset argument and season is one realization of season.subset. For example: out.file.name = "AnnualCycle" will store to the files to AnnualCycle_EUROPE_DJF.eps and AnnualCycle_EUROPE_JJA.eps.

copyright

Boolean. If a copyright message should be plotted. Default is FALSE.

...

Further optional arguments passed to bxp.

Author(s)

Georg Heinrich g.heinrich@uni-graz.at

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## load WUX and read WUX test data
require(wux)
data(ensembles)

wuxtest.df <- subset(ensembles, subreg == "GAR")

## set data frame for model marks
mark.df <- subset(wuxtest.df, acronym %in% c("ICTP-REGCM3", "MPI-M-REMO"))
mark.df2 <- gdata::drop.levels(mark.df)

## Not run: plotAnnualCycle(wuxtest.df, "perc.delta.precipitation_amount", mark.df =
mark.df, plot.legend = TRUE, boxfill = "light yellow", notch =
FALSE,  boxwex = 0.5, ylim = c(-60,60), plot.quantiles =
c(0.02,0.25,0.5,0.75,0.98), boxcol = "red", ylab = "Precipitation
Amount [%]", main = "Annual cycle ", las = 1, copyright = TRUE)

## End(Not run)

wux documentation built on May 30, 2017, 8:22 a.m.

Search within the wux package
Search all R packages, documentation and source code