plot_techmix: Create a techmix chart in a ggplot object

Description Usage Arguments Examples

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
plot_techmix(
  data,
  plot_title = "",
  show_legend = TRUE,
  df_tech_colours,
  df_bar_specs
)

Arguments

data

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

plot_title

Title of the plot (character string).

show_legend

Flag indicating whether legend should be shown (boolean).

df_tech_colours

Dataframe containing colors per technology (dataframe with columns: technology, label, color).

df_bar_specs

Dataframe containing order of bars and their labels (dataframe with columns: metric_type, label).

Examples

1
# TODO create an example or copy-paste an existing one from README or a test.

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