plotFun.barplotScen: Barplot with whiskers.

View source: R/plotFun.barplotScen.R

plotFun.barplotScenR Documentation

Barplot with whiskers.

Description

Barplot with whiskers, for instance to show mean and range of climate projections.

Usage

plotFun.barplotScen(obs, ctl, ctl.rg, p1, p1.rg, p2, p2.rg, p3, p3.rg, col,
  ylab = NULL, xlab = NULL, stn.name = NULL, breaks = seq(0,
  ceiling(p3.rg[2])), add.lines = F, lines = NULL, pch.obs = 8,
  cex.obs = 1.5)

Arguments

obs

observed value.

ctl

multi-model median/mean value in the historical period.

ctl.rg

2-element vector with the multi.model range (e.g. 5-95th percentiles) in the historical period.

p1

multi-model median/mean value in the short-term future period.

p1.rg

2-element vector with the multi.model range (e.g. 5-95th percentiles) in the short-term future period.

p2

multi-model median/mean value in the mid-term future period.

p2.rg

2-element vector with the multi.model range (e.g. 5-95th percentiles) in the mid-term future period.

p3

multi-model median/mean value in the long-term future period.

p3.rg

2-element vector with the multi.model range (e.g. 5-95th percentiles) in the long-term future period.

col

4-element vector with the colours for the four bars.

ylab

character string for the Y-axis.

xlab

4-element vector to label the bars.

stn.name

character with the name of the station.

breaks

vector of values with the Y-axis ticks.

add.lines

should horizontal lines be added for reference? Default: FALSE.

lines

values in the Y-axis to plot a horizontal line.

pch.obs

type of marker for the observations. Default:8.

cex.obs

relative size for the marker representing the observations. Default: 1.5.

Value

A bar plot consisting on 4 bars (e.g. historical and 3 future periods) and highlight the observations with a markers. Uncertainty is shown though small segments.

Author(s)

Ana Casanueva (22.03.2019)


anacv/plotFun documentation built on June 21, 2022, 10:31 p.m.