qplot_trajectory: Create a quick trajectory plot

View source: R/qplot_trajectory.R

qplot_trajectoryR Documentation

Create a quick trajectory plot

Description

Compared to plot_trajectory() this function:

  • is restricted to plotting only 5 years from the start year,

  • outputs pretty legend labels, based on the column holding metrics,

  • outputs a title,

  • outputs a subtitle,

  • outputs informative axis labels in sentence case.

Usage

qplot_trajectory(data)

Arguments

data

A data frame. Requirements:

  • The structure must be like market_share.

  • The following columns must have a single value: sector, technology, region, scenario_source.

  • (Optional) If present, the column label is used for data labels.

Value

An object of class "ggplot".

See Also

plot_trajectory

Examples

# `data` must meet documented "Requirements"
data <- subset(
  market_share,
  sector == "power" &
    technology == "renewablescap" &
    region == "global" &
    scenario_source == "demo_2020"
)

qplot_trajectory(data)

r2dii.plot documentation built on May 31, 2023, 6:46 p.m.