SSplotSpawnrecruit: Plot spawner-recruit curve.

View source: R/SSplotSpawnrecruit.R

SSplotSpawnrecruitR Documentation

Plot spawner-recruit curve.

Description

Plot spawner-recruit curve based on output from Stock Synthesis model.

Usage

SSplotSpawnrecruit(
  replist,
  subplot = 1:3,
  add = FALSE,
  plot = TRUE,
  print = FALSE,
  xlim = NULL,
  ylim = NULL,
  labels = c("Spawning biomass (mt)", "Recruitment (1,000s)", "Spawning output",
    expression(paste("Spawning output (relative to ", italic(B)[0], ")")),
    expression(paste("Recruitment (relative to  ", italic(R)[0], ")")),
    "Log recruitment deviation"),
  bioscale = "default",
  plotdir = "default",
  pwidth = 6.5,
  pheight = 6.5,
  punits = "in",
  res = 300,
  ptsize = 10,
  verbose = TRUE,
  colvec = c("blue", "black", "black", gray(0, 0.7)),
  ltyvec = c(1, 2, 1, NA),
  ptcol = "default",
  legend = TRUE,
  legendloc = NULL,
  minyr = "default",
  textmindev = 0.5,
  relative = FALSE,
  expected = TRUE,
  estimated = TRUE,
  bias_adjusted = TRUE,
  show_env = TRUE,
  virg = TRUE,
  init = TRUE,
  forecast = FALSE
)

Arguments

replist

A list object created by SS_output().

subplot

vector of which subplots to show. 1=plot without labels, 2=plot with year labels.

add

add to existing plot?

plot

plot to active plot device?

print

print to PNG files?

xlim

optional control of x range

ylim

optional control of y range

labels

vector containing x-axis label for models with spawning biomass in metric tons, y-axis label, and alternative x-axis for models with a fecundity relationship making spawning output not equal to spawning biomass.

bioscale

multiplier on spawning biomass, set to 0.5 for single-sex models

plotdir

directory where PNG files will be written. by default it will be the directory where the model was run.

pwidth

Default width of plots printed to files in units of punits. The default is pwidth=6.5.

pheight

Height of plots printed to png files in units of punits. Default is designed to allow two plots per page, with pheight_tall used for plots that work best with a taller format and a single plot per page.

punits

Units for pwidth and pheight. Can be "px" (pixels), "in" (inches), "cm" (centimeters), or "mm" (millimeters). The default is punits="in".

res

Resolution of plots printed to files. The default is res = 300.

ptsize

Point size for plotted text in plots printed to files (see help("png") in R for details).

verbose

report progress to R GUI?

colvec

vector of length 4 with colors for 3 lines and 1 set of points (where the 4th value for the points is the color of the circle around the background color provided by ptcol

ltyvec

vector of length 4 with line types for the 3 lines and 1 set of points, where the points are disconnected (lty=NA) by default

ptcol

vector or single value for the color of the points, "default" will by replaced by a vector of colors of length equal to nrow(replist[["recruit"]])

legend

add a legend to the figure?

legendloc

location of legend. By default it is chosen as the first value in the set of "topleft", "topright", "bottomright" that results in no overlap with the points in the plot, but the user can override this with their choice of location. See ?legend for more info on the options.

minyr

minimum year of recruitment deviation to show in plot

textmindev

minimum recruitment deviation for label to be added so only extreme devs are labeled (labels are added to first and last years as well). Default=0.7.

relative

scale both axes so that B0 and R0 are at 1 to show spawning output and recruitment relative to the equilibrium

expected

show line for expected recruitment (stock-recruit curve)

estimated

show points for estimated recruitment values (including deviations)

bias_adjusted

show lines for bias adjusted expected recruitment

show_env

add line for expected recruitment with environmental variability

virg

add point for equilibrium conditions (x=B0,y=R0)

init

add point for initial conditions (x=B1,y=R1), only appears if this point differs from virgin values

forecast

include forecast years in the curve?

Author(s)

Ian Stewart, Ian Taylor

See Also

SS_plots(), SS_output()


r4ss documentation built on May 28, 2022, 1:11 a.m.