plot_trajectory: Create a trajectory alignment chart in a ggplot object

Description Usage Arguments

View source: R/plot_2diicharts.R

Description

The function returns a ggplot object containing a stacked bar chart showing a technology mix for different categories (portfolio, scenario, benchmark, etc.).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
plot_trajectory(
  data,
  plot_title = "",
  x_title = "",
  y_title = "",
  annotate_data = FALSE,
  scenario_specs_good_to_bad,
  main_line_metric,
  additional_line_metrics = data.frame()
)

Arguments

data

Filtered input data (dataframe with columns: year, metric_type, metric and value).

plot_title

Title of the plot (character string).

x_title, y_title

Title of the x- and y-axis (character string).

annotate_data

Flag indicating whether the data should be annotated (boolean).

scenario_specs_good_to_bad

Dataframe containing scenario specifications like color or label, ordered from the most to least sustainable (dataframe with columns: scenario, label, color).

main_line_metric

Dataframe containing information about metric that should be plotted as the main line (dataframe with columns: metric, label).

additional_line_metrics

Dataframe containing information about additional metrics that should be plotted as lines (dataframe with columns: metric, label).


2DegreesInvesting/r2dii.ggplot documentation built on April 15, 2021, 5:22 a.m.