plotAgTradeoff: Aggregate trade off plot

Description Usage Arguments Value Examples

View source: R/plotTradeoffs.R

Description

This function generates Kobe style plots for a series of conservation- and catch-based performance metrics.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
plotAgTradeoff(
  agDat,
  consVar = "medSpawners",
  catchVar = "medCatch",
  facet = "om",
  shape = NULL,
  hotColors = TRUE,
  showUncertainty = FALSE,
  legendLab = NULL,
  xLab = NULL,
  yLab = NULL,
  mainLab = NULL,
  axisSize = 14,
  dotSize = 4,
  lineSize = 1.25,
  legendSize = 14,
  scaleAxis = "free",
  facetLetter = FALSE
)

Arguments

agDat

Dataframe generated by buildAgDat.

consVar

A character value corresponding to a conservation based PM in cuDat$vars.

catchVar

A character value corresponding to a catch based PM in cuDat$vars.

facet

A character value that can take the values: "mp", "om" and specifies along which categorical variable the plot should be faceted.

shape

A character value that defaults to NULL, but can take values "mp" or "om", and specifies along which categorical variable shapes should be plotted. Note maximum number of levels is 5.

hotColors

A logical (default TRUE) that specifies whether symbols should be filled with viridis palette or solid black.

showUncertainty

A logical specifying whether whiskers for each variables credible interval should be plotted.

legendLab

A character representing the legend title.

xLab

A character representing the x axis label.

yLab

A character representing the y axis label.

mainLab

A character specifying a plot title (defaults to NULL).

axisSize

A number representing the font size for the axes.

dotSize

A number representing the dot size.

lineSize

A number representing the line width.

legendSize

A number representing the size of the legend text.

scaleAxis

A character vector that can take values 'c("fixed", "free", "free_x", "free_y")' that determines which axes, if any, have variable axes dimensions across facets.

facetLetter

A logical that determines facets are labelled with letters for referencing in text.

Value

Returns a ggplot object.

Examples

1
2
3
4
#plotAgTradeoff(agPlottingDF, consVar = "medSpawners", catchVar = "medCatch",
#facet = "om", showUncertainty = TRUE,
#legendLab = "Prop. TAC in mixed stock fishery", xLab = "Median Catch",
#yLab = "Median Spawners")

TESA-workshops/TESAsamSim documentation built on Feb. 6, 2021, 12:25 a.m.