plot_parallel_coords: Make parallel coordinates plot of performance metrics

View source: R/figures-parallel-coordinates.R

plot_parallel_coordsR Documentation

Make parallel coordinates plot of performance metrics

Description

Make parallel coordinates plot of performance metrics

Usage

plot_parallel_coords(
  pm_df_list,
  type = c("facet", "single"),
  custom_pal = NULL,
  groups = NULL,
  rotate_labels = type == "facet",
  french = isTRUE(getOption("french"))
)

Arguments

pm_df_list

A named list of performance metric data frames from get_probs(). The names will be used as the plot labels.

type

The type of plot. Multipanel "facet" vs. single panel "single". In the single panel version, a shaded ribbon represents the upper and lower values across the scenarios and the line represents the mean.

custom_pal

An optional custom color palette. Should be a named character vector

groups

An optional grouping structure to separate the lines. For example, this allows for conservation and fisheries performance metrics to use distinct line segments. Should be a list with the performance metrics grouped. See the example below.

rotate_labels

Logical: rotate the performance metric labels 90 degrees?

french

French?

Value

A ggplot2 object

Examples

probs <- get_probs(mse_example, "P40", "P100", "PNOF", "LTY", "AAVY")
pm <- list()
pm[[1]] <- get_probs(mse_example, "P40", "P100", "PNOF", "LTY", "AAVY")
pm[[2]] <- get_probs(mse_example, "P40", "P100", "PNOF", "LTY", "AAVY")
names(pm) <- c("Scenario 1", "Scenario 2")
plot_parallel_coords(pm)
plot_parallel_coords(pm, "single")
plot_parallel_coords(pm, groups = list(c("P40", "P100", "PNOF"), c("LTY", "AAVY")))

pbs-assess/gfdlm documentation built on Nov. 22, 2023, 10:11 p.m.