Create a trajectory plot
Arguments
- data
A data frame like the outputs of
prep_trajectory().(Optional) If present, the column
labelis used for data labels.
- center_y
Logical. Use
TRUEto center the y-axis around start value (the default behavior ofqplot_trajectory()), or useFALSEto not center.- perc_y_scale
Logical.
FALSEdefaults to using no label conversion. UseTRUEto convert labels on y-axis to percentage usingscales::percent(the default behavior ofqplot_trajectory()).
Examples
# plot with `qplot_trajectory()` parameters
data <- subset(
market_share_demo,
sector == "power" &
technology == "renewablescap" &
region == "global" &
scenario_source == "demo_2020"
)
data <- prep_trajectory(data)
plot_trajectory(
data,
center_y = TRUE,
perc_y_scale = TRUE
)
