plotPercentiles: Comparison line plots with percentiles

View source: R/plotPercentiles.R

plotPercentilesR Documentation

Comparison line plots with percentiles

Description

Line plots show median (50th percentile) of user selected variable(s) obtained from different scenario runs. If available in the data, ribbon plots will also show the 33th - 67th percentile region in a darker color and the 5th – 95th percentile region in a lighter color. Note: the 5th, 33th, 67th and 95th percentiles must be provided in the data set as the percentiles are not computed

Usage

plotPercentiles(df, scenarios = NULL, variables = NULL)

Arguments

df

The quitte-style data frame must contain all percentiles of the quantity of interest as individual variables (e.g. for atmospheric CO2 concentrations "Atmospheric Concentrations|CO2|50th Percentile", "Atmospheric Concentrations|CO2|33th Percentile", ..., must be present)

scenarios

Character vector containing names of the desired scenarios. If NULL, all scenarios present in the data will be displayed

variables

Character vector containing names of the desired variables. If NULL, all variables present in the data will be displayed. When selecting particular variables for display only use the "Any|Variable"-prefix and omit the "X-th Percentile"-suffix (e.g. for atmospheric CO2 concentrations write "Atmospheric Concentrations|CO2")

Example Plot

Atmospheric CO2 concentrations for all scenarios available in the data

Author(s)

Tonn Rüter

Examples

## Not run: 
# Plot atmospheric CO2 concentrations for all scenarios available in the data
p <- plotPercentiles(
  data,
  # Use variable name without "X-th Percentile"-suffix
  variables = c("AR6 climate diagnostics|Atmospheric Concentrations|CO2|MAGICCv7.5.3")
)
# Plot all available variables for selected scenarios
p <- plotPercentiles(data, scenarios = c("d_delfrag", "d_another"))

## End(Not run)

pik-piam/mip documentation built on April 5, 2024, 12:31 p.m.