SSplotAgeMatrix: Plot matrix of either length or observed age at true age

View source: R/SSplotAgeMatrix.R

SSplotAgeMatrixR Documentation

Plot matrix of either length or observed age at true age

Description

Distribution of length at age or observed age at true age is represented as a histogram. Values are from the AGE_LENGTH_KEY and AGE_AGE_KEY sections of Report.sso ($ALK and $AAK in the list created by SS_output)

Usage

SSplotAgeMatrix(
  replist,
  option = 1,
  slices = NULL,
  scale = NULL,
  add = FALSE,
  col.grid = "grey90",
  col.bars = grey(0, alpha = 0.5),
  shift_hi = 0,
  shift_lo = 0,
  plot = TRUE,
  print = FALSE,
  labels = c("Age", "Length", "True age", "Observed age", "for ageing error type",
    "Distribution of", "at"),
  pwidth = 6.5,
  pheight = 5,
  punits = "in",
  res = 300,
  ptsize = 10,
  cex.main = 1,
  mainTitle = TRUE,
  plotdir = "default"
)

Arguments

replist

A list object created by SS_output().

option

Switch set to either 1 for length at true age or 2 for obs. age at true age

slices

Optional input to choose which matrix (slice of the 3D-array) within $AAK or $ALK to plot. By default all slices will be shown. For ageing imprecision this should correspond to the ageing error matrix number. Distribution of length at age ($ALK) is ordered by season, sub-season, and then morph. A future version could allow subsetting plots by these dimensions.

scale

Multiplier for bars showing distribution. Species with many ages benefit from expanded bars. NULL value causes function to attempt automatic scaling.

add

Add to existing plot

col.grid

A character value specifying the color of the grid lines

col.bars

The color of the filled polygons.

shift_hi

A numeric value specifying the amount to shift the top of the polygon up.

shift_lo

A numeric value specifying the amount to shift the bottom of the polygon up.

plot

Plot to active plot device?

print

Print to PNG files?

labels

Vector of labels for plots (titles and axis labels)

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

mainTitle

Logical indicating if a title should be included at the top

plotdir

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

Author(s)

Ian G. Taylor

See Also

SSplotNumbers()


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