SSplotCatch: Plot catch related quantities.

View source: R/SSplotCatch.R

SSplotCatchR Documentation

Plot catch related quantities.

Description

Plot catch related quantities from Stock Synthesis output. Plots include harvest rate, continuous F, landings, and discard fraction.

Usage

SSplotCatch(
  replist,
  subplots = 1:16,
  add = FALSE,
  areas = 1,
  plot = TRUE,
  print = FALSE,
  type = "l",
  fleetlty = 1,
  fleetpch = 1,
  fleetcols = "default",
  fleetnames = "default",
  lwd = 3,
  areacols = "default",
  areanames = "default",
  minyr = -Inf,
  maxyr = Inf,
  annualcatch = TRUE,
  forecastplot = FALSE,
  plotdir = "default",
  showlegend = TRUE,
  legendloc = "topleft",
  order = "default",
  xlab = "Year",
  labels = c("Harvest rate/Year", "Continuous F", "Landings", "Total catch",
    "Predicted discards", "Discard fraction", "(mt)", "(numbers x1000)",
    "Observed and expected", "aggregated across seasons"),
  catchasnumbers = NULL,
  catchbars = TRUE,
  addmax = TRUE,
  ymax = NULL,
  pwidth = 6.5,
  pheight = 5,
  punits = "in",
  res = 300,
  ptsize = 10,
  cex.main = 1,
  verbose = TRUE
)

Arguments

replist

A list object created by SS_output().

subplots

Vector controlling which subplots to create Numbering of subplots is as follows,

Basic plots for all models

  • 1 landings

  • 2 landings stacked

  • 3 observed and expected landings (if different)

  • 9 harvest rate

Plots for models with discards

  • 4 total catch (including discards)

  • 5 total catch (including discards) stacked

  • 6 discards

  • 7 discards stacked plot (depends on multiple fleets)

  • 8 discard fraction

  • 16 landings + dead discards

Plots for seasonal models

  • 10 landings aggregated across seasons

  • 11 landings aggregated across seasons stacked

  • 12 total catch (if discards present) aggregated across seasons

  • 13 total catch (if discards present) aggregated across seasons stacked

  • 14 discards aggregated across seasons

  • 15 discards aggregated across seasons stacked

add

Add to existing plot? (not yet implemented)

areas

Optional subset of areas to plot for spatial models

plot

Plot to active plot device?

print

Print to PNG files?

type

Type parameter passed to plot function. Default "l" is lines only. Other options include "o" for overplotting points on lines.

fleetlty

Vector of line type by fleet

fleetpch

Vector of plot character by fleet

fleetcols

Vector of colors by fleet

fleetnames

Optional replacement for fleenames used in data file, should include all fleets (not just those with catch)

lwd

Line width

areacols

Vector of colors by area. Default uses rich.colors by Arni Magnusson

areanames

Names for areas. Default is to use Area1, Area2,...

minyr

Optional input for minimum year to show in plots

maxyr

Optional input for maximum year to show in plots

annualcatch

Include plot of catch aggregated across seasons within each year

forecastplot

Add points from forecast years

plotdir

Directory where PNG or PDF files will be written. By default it will be the directory where the model was run.

showlegend

Put legend on plot

legendloc

Location of legend (see ?legend for more info)

order

Optional input to change the order of fleets in stacked plots.

xlab

x-label for all plots

labels

Vector of labels for plots (titles and axis labels)

catchasnumbers

Is catch in numbers instead of biomass? Should be set automatically if set to NULL. If fleets include a mix of biomass and numbers, then catch plots should be interpreted carefully.

catchbars

Show catch by fleet as barplot instead of stacked polygons? (default=TRUE)

addmax

Add a point on the y-axis for the maximum catch (default=TRUE)

ymax

Optional input for ymax value (can be used to add or subtract white space at the top of the figure)

pwidth

Width of plot

pheight

Height of plot

punits

Units for PNG file

res

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

ptsize

point size for PNG file

cex.main

Character expansion for plot titles

verbose

Report progress to R console?

Author(s)

Ian Taylor, Ian Stewart

See Also

SS_plots(), SS_output()


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