plot_dots: Dot plot

View source: R/figures-dots.R

plot_dotsR Documentation

Dot plot

Description

Dot plot

Usage

plot_dots(
  pm_df_list,
  type = c("single", "facet"),
  custom_pal = NULL,
  dodge = 0.6,
  bar_alpha = 0.2,
  pt_size = 2.25,
  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. Can also be a single data frame from get_probs().

type

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

custom_pal

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

dodge

The amount to separate or "dodge" the dots.

bar_alpha

Background bar transparency. 0 will omit.

pt_size

Point size.

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_dots(pm)
plot_dots(pm, type = "facet")

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