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