mipplot_line {mipplot}R Documentation

Line plot from IAMC data

Description

The function arguments include the input dataframe, labels for the plot/axes/legend, and faceting dimensions

Usage

mipplot_line(
  D,
  region = levels(D$region),
  variable = levels(D$variable),
  colorby = "scenario",
  linetypeby = "model",
  shapeby = "model",
  scenario = levels(D$scenario),
  facet_x = NULL,
  facet_y = NULL,
  legend = TRUE,
  PRINT_OUT = FALSE,
  DEBUG = TRUE,
  axis_year_text_angle = 0,
  language = "en",
  max_scenarios = 15,
  max_models = 15
)

Arguments

D

A dataframe of IAMC data in tibble format to produce plots.

region

A list of regions.

variable

A list of variables.

colorby

an axis for color setting.

linetypeby

an axis for line type setting.

shapeby

an axis for shape setting.

scenario

A list of scenarios.

facet_x

facet_x

facet_y

facet_y

legend

set TRUE to plot legend. default is TRUE.

PRINT_OUT

set TRUE to generate PDF files.

DEBUG

set TRUE to show debug messages.

axis_year_text_angle

text angle of x axis

language

A string of language. Possible values are "en", "jp", "es", "zh-cn", "zh-tw". The default value is "en".

max_scenarios

Maximum number of scenarios to be shown. If legend is FALSE, this option is .

max_models

Maximum number of models to be shown. If legend is FALSE, this option is

Value

A list of line plots.

Examples


library(dplyr)
data_subset <- ar5_db_sample_data %>%
filter( model %in% c("AIM-Enduse 12.1", "GCAM 3.0", "IMAGE 2.4") ) %>%
filter(2005 <= period) %>%
filter(period <= 2100)
mipplot_line(
data_subset,
variable = c("Emissions|CO2"),
scenario = c("EMF27-450-Conv", "EMF27-450-FullTech", "EMF27-450-NoCCS"),
region = c("ASIA"),
legend = TRUE,
axis_year_text_angle = 0,
language = 'en')


[Package mipplot version 0.3.1 Index]