plotAgDot: Aggregate dot plot

Description Usage Arguments Value Examples

View source: R/plotDots.R

Description

This function generates dot plots with credible intervals for performance metrics. Note that for aggregate data, variables should be filtered from dataframe before it is passed as an argument (i.e. plots all variables by default).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
plotAgDot(
  agDat,
  group = "om",
  legendLab = "Operating\nModel",
  xLab = NULL,
  yLab = NULL,
  plotTitle = NULL,
  axisSize = 14,
  dotSize = 4,
  lineSize = 1,
  legendSize = 14
)

Arguments

agDat

Dataframe generated by buildCUDat.

group

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

legendLab

A character representing the legend title.

xLab

A character representing the x axis label.

yLab

A character representing the y axis label.

plotTitle

A character representing the main plot title.

axisSize

A number representing the font size for the axis.

dotSize

A number representing the dot size.

lineSize

A number representing the line size.

legendSize

A number representing the font size for the legend.

Value

Returns a ggplot object.

Examples

1
2
3
4
5
6
7
trimDat <- agPlottingDF %>%
dplyr::filter(var %in% c("medSpawners", "medCatch", "ppnCULower", "ppnCUExtinct"))

plotAgDot(trimDat, group = "om",
         legendLab = "Secondary MPs", xLab = "Proportion Mixed Stock TAC",
         yLab = "Median Catch", axisSize = 14, dotSize = 4, lineSize = 1,
         legendSize = 14)

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