plot_tradeoff: Make a trade-off scatterplot

View source: R/figures-bivariate.R

plot_tradeoffR Documentation

Make a trade-off scatterplot

Description

Creates a trade-off scatterplot of 2 performance metrics across multiple scenarios

Usage

plot_tradeoff(
  pm_df_list,
  xvar,
  yvar,
  custom_pal = NULL,
  mp = NULL,
  nudge_x = 0,
  nudge_y = 0.05,
  french = FALSE
)

Arguments

pm_df_list

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

xvar

The performance metric for the x axis (as character).

yvar

The performance metric for the y axis (as character).

custom_pal

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

mp

An optional character vector of MPs to include. By default includes all.

nudge_x

How far to nudge the labels left/right from the x-value for geom_text

nudge_y

How far to nudge the labels up/down from the y-value for geom_text

french

French

Value

A ggplot2 object

Examples

probs <- list(get_probs(mse_example, "P40", "P100", "PNOF", "LTY", "AAVY"))
names(probs) <- "Scenario 1"
plot_tradeoff(probs, "P40", "LTY")

pbs-assess/ggmse documentation built on Nov. 21, 2023, 8:06 p.m.