spmphaseplot: spmphaseplot - plots the phase plot of harvest rate vs...

View source: R/spm.r

spmphaseplotR Documentation

spmphaseplot - plots the phase plot of harvest rate vs biomass

Description

spmphaseplot uses the output from displayModel to plot up the phase plot of harvest rate vs Biomass, marked with the limit and default targets. It identifies the start and end years (green and red dots) and permits the stock status to be determined visually. It also plots out the catch time-series and harvest rate time-series to aid in interpretation of the phase plot.

Usage

spmphaseplot(
  answer,
  Blim = 0.2,
  Btarg = 0.5,
  filename = "",
  resol = 200,
  fnt = 7
)

Arguments

answer

the object output by the function displayModel, containing the production curve, the fishery dynamics (predicted harvest rate and biomass through time).

Blim

the limit reference point, defaults to 0.2 so that 0.2B0 is used.

Btarg

what target reference point will be used in the phase plot. A default of 0.5 is used.

filename

default is empty. If a filename is put here a .png file with that name will be put into the working directory.

resol

the resolution of the png file, defaults to 200 dpi

fnt

the font used in the plot and axes. Default=7, bold Times. Using 6 gives Times, 1 will give SansSerif, 2 = bold Sans

Value

an invisible list of B0, Bmsy, Hmsy, and Hlim.

Examples

## Not run: 
  data(dataspm)
  fish <- dataspm$fish
  pars <- c(0.164,6740,3564)
  bestSP <- optim(par=pars,fn=negLL,callfun=simpspm,indat=fish)
  ans <- displayModel(bestSP$par,fish,schaefer=TRUE,addrmse=TRUE)
  str(ans)
  outs <- spmphaseplot(ans,fnt=7)
  str(outs)

## End(Not run)

haddonm/datalowSA documentation built on Nov. 5, 2023, 6:40 p.m.