Learn R Programming

SeaVal (version 1.1.1)

tercile_plot: Function for plotting terciles

Description

Function for plotting terciles

Usage

tercile_plot(
  dt,
  data_col = tc_cols(dt),
  mn = NULL,
  low = "orange",
  mid = "cyan",
  high = "green1",
  name = "",
  labels = c("Wetter", "Average", "Drier"),
  na.value = "white",
  extent = NULL,
  expand.x = c(-0.5, 0.5),
  expand.y = c(-0.5, 2)
)

Arguments

dt

data table

data_col

Name of the column containing the observed tercile category

mn

optional title for the plot.

low, mid, high

colors for the three categories

name

optional title for the colorscale

labels

How to label the three categories

na.value

How to color missing values

extent

Optional vector of length 4 specifying the plotting borders in order xmin, xmax, ymin, ymax.

expand.x, expand.y

How far should the plotting borders be extended (beyond the data range)?

Examples

Run this code
# \donttest{
dt = combine(chirps_monthly[month == 12],tfc_from_efc(ecmwf_monthly[month == 12]))
p = tercile_plot(dt)
if(interactive()) plot(p)
# }

Run the code above in your browser using DataLab