showLinePlots: Show Line Plots

View source: R/showLinePlots.R

showLinePlotsR Documentation

Show Line Plots

Description

Creates 2 sets of line plots from scenario data and shows them.

Usage

showLinePlots(
  data,
  vars = getVars(as.quitte(data)),
  histVars = vars,
  scales = "free_y",
  ylim = 0,
  show.dots = TRUE,
  color.dim.name = NULL,
  mainReg = getOption("mip.mainReg"),
  color.dim.manual = NULL,
  histModelsExclude = character(),
  vlines = NULL
)

Arguments

data

A quitte object or an object that can be transformed into a quitte object.

vars

A character vector of variables to be plotted. Defaults to all variables in data.

histVars

A character vector of historical variables to be plotted. Defaults to vars.

scales

A single string. choose either "free_y" or "fixed".

ylim

y limits

show.dots

If TRUE: shows geom_point dots on line. If FALSE: only plots geom_line without geom_point

color.dim.name

name for the color-dimension used in the legend

mainReg

A single string. The plots for this region are shown enlarged. Use options(mip.mainReg=<value>) to set globally.

color.dim.manual

optional vector with manual colors replacing default colors of color.dim, default is NULL.

histModelsExclude

A character vector with historical models to exclude.

vlines

period used for vertical line

Details

Two sets of line plots are shown (main region + others), depicting the values in vars over time. Faceting is done by region. The plots arranged and shown.

Value

NULL is returned invisible.

Example Plots

showLinePlots.png

Examples

## Not run: 
options(mip.mainReg = "World")
data <- as.quitte(data)
showLinePlots(data, "Policy Cost|GDP Loss")

## End(Not run)

pik-piam/mip documentation built on April 13, 2025, 5:45 p.m.