View source: R/plot_trajectory.R
plot_trajectory | R Documentation |
Create a trajectory plot
plot_trajectory(
data,
span_5yr = FALSE,
convert_label = identity,
center_y = FALSE,
value_col = "percentage_of_initial_production_by_scope",
perc_y_scale = FALSE
)
data |
A data frame. Requirements:
|
span_5yr |
Logical. Use |
convert_label |
A symbol. The unquoted name of a function to apply to y-axis labels. For example:
|
center_y |
Logical. Use |
value_col |
Character. Name of the column to be used as a value to be plotted. |
perc_y_scale |
Logical. |
An object of class "ggplot".
market_share.
# `data` must meet documented "Requirements"
data <- subset(
market_share,
sector == "power" &
technology == "renewablescap" &
region == "global" &
scenario_source == "demo_2020"
)
plot_trajectory(data)
# plot with `qplot_trajectory()` parameters
plot_trajectory(
data,
span_5yr = TRUE,
convert_label = recode_metric_trajectory,
center_y = TRUE,
value_col = "percentage_of_initial_production_by_scope",
perc_y_scale = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.