plotSim: General plotting function for simulated data

Description Usage Arguments Value Author(s) Examples

View source: R/plotSim.r

Description

A general function that plots the simulation object. Includes four different plots: equilbrium size structure, maturity and selectivity curves, growth curves, and relative Yield, YPR, SPR, SSB, and Recruitment curves.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
plotSim(
  LB_obj = NULL,
  type = c("all", "len.freq", "growth", "maturity.select", "yield.curve"),
  lf.type = c("catch", "pop"),
  growth.type = c("LAA", "WAA"),
  y.type = c("SPR", "SSB", "Yield", "YPR"),
  x.type = c("FM", "SSB", "SPR"),
  perRec = FALSE,
  inc.SPR = TRUE,
  Cols = NULL,
  size.axtex = 12,
  size.title = 14,
  size.SPR = 4,
  size.leg = 12,
  inc.pts = TRUE,
  size.pt = 4
)

Arguments

LB_obj

an object of class 'LB_obj' that contains the life history and fishing information

type

a character value indicating which plots to include: "all", "len.freq", "growth", "maturity.select", "yield.curve"

lf.type

a character value indicating if the catch or pop (population) should be plotted for the length frequency

growth.type

should growth be plotted as length-at-age ("LAA") or weight-at-age ("WAA")

y.type

what curves should be plotted on y-axis? "SPR", "SSB", "Yield", "YPR"

x.type

what curves should be plotted on x-axis? "FM", "SSB", "SPR"

perRec

a logical to indicate if plot should be per-recruit (ignore steepness) or not (zero recruitment if SPR below replacement level)

inc.SPR

a logical to indicate if SPR value should be printed in top right corner of plot

Cols

optional character vector of colours for the plot

size.axtex

size of the axis text

size.title

size of axis title

size.SPR

size of SPR text

size.leg

size of legend text

inc.pts

Include points on the plots?

size.pt

size of the points on the plots

Value

a ggplot object

Author(s)

A. Hordyk

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
 LB_pars <- new("LB_pars")
 LB_pars@MK <- 1.5
 LB_pars@Linf <- 100
 LB_pars@L50 <- 50
 LB_pars@L95 <- 55
 LB_pars@SL50 <- 60
 LB_pars@SL95 <- 65
 LB_pars@FM <- 1
 Sim <- LBSPRsim(LB_pars)
 plotSim(Sim)

LBSPR documentation built on Oct. 6, 2021, 5:16 p.m.