# Load Data:
input_path <- system.file("extdata/in", package = "GTAPViz")
sl4.plot.data <- readRDS(file.path(input_path, "sl4.plot.data.rds"))
# Prepare Dataframe
sector_data <- sl4.plot.data[["COMM*REG"]]
# Plot
plotB <- detail_plot(
# === Input Data ===
data = sector_data,
filter_var = list(Region = "Oceania"),
x_axis_from = "Commodity",
split_by = "Region",
panel_var = "Experiment",
variable_col = "Variable",
unit_col = "Unit",
desc_col = "Description",
# === Plot Behavior ===
invert_axis = TRUE,
separate_figure = FALSE,
top_impact = NULL,
# === Variable Display ===
var_name_by_description = TRUE,
add_var_info = FALSE,
# === Export Settings ===
output_path = NULL,
export_picture = FALSE,
export_as_pdf = FALSE,
export_config = create_export_config(width = 45, height = 20),
# === Styling ===
plot_style_config = create_plot_style(
positive_color = "#2E8B57",
negative_color = "#CD5C5C",
panel_rows = 1,
panel_cols = NULL,
show_axis_titles_on_all_facets = FALSE,
y_axis_text_size = 25,
bar_width = 0.6,
all_font_size = 1.1
)
)
Run the code above in your browser using DataLab